Re: [PATCH 2/5] rds: ib: replace spin_lock_irq with spin_lock_irqsave

2017-03-11 Thread santosh.shilim...@oracle.com
On 3/11/17 6:33 PM, Yanjun Zhu wrote: Sorry. I have no test case to show some issue. But from Linux Kernel Development Second Edition by Robert Love. Yes I know the book and what the API does :D Use spin_lock_irq is dangerous since spin_unlock_irq unconditionally enables interrupts. We can

Re: [PATCH 2/5] rds: ib: replace spin_lock_irq with spin_lock_irqsave

2017-03-11 Thread Yanjun Zhu
Sorry. I have no test case to show some issue. But from Linux Kernel Development Second Edition by Robert Love. Use spin_lock_irq is dangerous since spin_unlock_irq unconditionally enables interrupts. We can assume the following scenario: --->the interrupt is disabled.

Re: [PATCH 2/5] rds: ib: replace spin_lock_irq with spin_lock_irqsave

2017-03-09 Thread Santosh Shilimkar
On 3/8/2017 11:26 PM, Zhu Yanjun wrote: It is difficult to make sure the state of the interrupt when this function is called. As such, it is safer to use spin_lock_irqsave than spin_lock_irq. There is no reason to hold irqs and as such the code path is safe from irq context. I don't see need

[PATCH 2/5] rds: ib: replace spin_lock_irq with spin_lock_irqsave

2017-03-08 Thread Zhu Yanjun
It is difficult to make sure the state of the interrupt when this function is called. As such, it is safer to use spin_lock_irqsave than spin_lock_irq. Cc: Joe Jin Cc: Junxiao Bi Signed-off-by: Zhu Yanjun --- net/rds/ib_cm.c |