RE: [PATCH 1/1] rapidio/rio_cm: avoid GFP_KERNEL in atomic context

2016-09-19 Thread Bounine, Alexandre
On Fri, Sep 16, 2016 6:08 PM Andrew Morton wrote: > > > > + if (!list_empty(&list)) > > + list_for_each_entry(ch, &list, ch_node) > > + riocm_send_close(ch); > > + > > return NOTIFY_DONE; > > } > > Fair enough. > > Can we remove the !list_empty() test? Sure.

Re: [PATCH 1/1] rapidio/rio_cm: avoid GFP_KERNEL in atomic context

2016-09-16 Thread Andrew Morton
On Thu, 15 Sep 2016 13:54:02 -0400 Alexandre Bounine wrote: > As reported by Alexey Khoroshilov > (see https://lkml.org/lkml/2016/9/9/737): > riocm_send_close() is called from rio_cm_shutdown() under > spin_lock_bh(idr_lock), but riocm_send_close() uses a GFP_KERNEL > allocation. > > Fix by ta

[PATCH 1/1] rapidio/rio_cm: avoid GFP_KERNEL in atomic context

2016-09-15 Thread Alexandre Bounine
As reported by Alexey Khoroshilov (see https://lkml.org/lkml/2016/9/9/737): riocm_send_close() is called from rio_cm_shutdown() under spin_lock_bh(idr_lock), but riocm_send_close() uses a GFP_KERNEL allocation. Fix by taking riocm_send_close() outside of spinlock protected code. Reported-by: Ale