CC: [email protected] TO: "Matthew Wilcox (Oracle)" <[email protected]> CC: Andrew Morton <[email protected]> CC: Linux Memory Management List <[email protected]> CC: Alexey Dobriyan <[email protected]> CC: Waiman Long <[email protected]> CC: Vasily Averin <[email protected]> CC: Pankaj Bharadiya <[email protected]> CC: [email protected]
From: kernel test robot <[email protected]> ipc/util.c:244:29-39: ERROR: function ipc_id_alloc called on line 305 inside lock on line 299 but uses GFP_KERNEL ipc/util.c:253:40-50: ERROR: function ipc_id_alloc called on line 305 inside lock on line 299 but uses GFP_KERNEL Find functions that refer to GFP_KERNEL but are called with locks held. Semantic patch information: The proposed change of converting the GFP_KERNEL is not necessarily the correct one. It may be desired to unlock the lock, or to not call the function under the lock in the first place. Generated by: scripts/coccinelle/locks/call_kern.cocci Fixes: dc996261c060 ("ipc: convert ipcs_idr to XArray") CC: Matthew Wilcox (Oracle) <[email protected]> Signed-off-by: kernel test robot <[email protected]> --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 842221d073a88c9cd1aa01777c4b69020c28e7a4 commit: dc996261c060f06e1f20f580e203b81a4ddfe301 [16130/16374] ipc: convert ipcs_idr to XArray :::::: branch date: 17 hours ago :::::: commit date: 3 days ago Please take the patch only if it's a positive warning. Thanks! util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/ipc/util.c +++ b/ipc/util.c @@ -241,7 +241,7 @@ static inline int ipc_id_alloc(struct ip xas.xa_index; xas_store(&xas, new); xas_clear_mark(&xas, XA_FREE_MARK); - } while (__xas_nomem(&xas, GFP_KERNEL)); + } while (__xas_nomem(&xas, GFP_ATOMIC)); xas_unlock(&xas); err = xas_error(&xas); @@ -250,7 +250,7 @@ static inline int ipc_id_alloc(struct ip new->id = get_restore_id(ids); new->seq = ipcid_to_seqx(new->id); idx = ipcid_to_idx(new->id); - err = xa_insert(&ids->ipcs, idx, new, GFP_KERNEL); + err = xa_insert(&ids->ipcs, idx, new, GFP_ATOMIC); if (err == -EBUSY) err = -ENOSPC; set_restore_id(ids, -1); _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
