RE: [PATCH] rapidio: avoid GFP_KERNEL in atomic context in riocm_send_close()

2016-09-14 Thread Bounine, Alexandre
On Sunday, Sep 11, 2016 12:45 AM Andrew Morton > On Fri, 9 Sep 2016 21:22:14 -0700 Andrew Morton foundation.org> wrote: > > > Why not just make `hdr' a local? It isn't very large and the code > > becomes smaller and faster. > > Actually, doing it this way saves some code size and is faster: >

Re: [PATCH] rapidio: avoid GFP_KERNEL in atomic context in riocm_send_close()

2016-09-10 Thread Andrew Morton
On Fri, 9 Sep 2016 21:22:14 -0700 Andrew Morton wrote: > Why not just make `hdr' a local? It isn't very large and the code > becomes smaller and faster. Actually, doing it this way saves some code size and is faster: From: Andrew Morton Subject: drivers/rapidio/rio_cm.c: avoid GFP_KERNEL in

Re: [PATCH] rapidio: avoid GFP_KERNEL in atomic context in riocm_send_close()

2016-09-09 Thread Andrew Morton
On Fri, 9 Sep 2016 23:43:35 +0300 Alexey Khoroshilov wrote: > riocm_send_close() is called from rio_cm_shutdown() and riocm_ch_close(). > The first site is within section protected by idr_lock spinlock, > while the second one is not in atomic context. > > The patch adds gfp_t argument to alloc

[PATCH] rapidio: avoid GFP_KERNEL in atomic context in riocm_send_close()

2016-09-09 Thread Alexey Khoroshilov
riocm_send_close() is called from rio_cm_shutdown() and riocm_ch_close(). The first site is within section protected by idr_lock spinlock, while the second one is not in atomic context. The patch adds gfp_t argument to allocate memory appropriately to the corresponding context. Found by Linux Dri