Message ID | alpine.DEB.2.22.394.2006151258170.23306@hadrien (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | ipc: fix call_kern.cocci warnings | expand |
On Mon, Jun 15, 2020 at 01:53:54PM +0200, Julia Lawall wrote: > From: kernel test robot <lkp@intel.com> > > This function is called from ipc_addid with a spin lock held so change > GFP_KERNEL to GFP_ATOMIC. > > Generated by: scripts/coccinelle/locks/call_kern.cocci > > Fixes: dc996261c060 ("ipc: convert ipcs_idr to XArray") We're dropping this patch; the problems go far deeper.
--- 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);