Content-Type: multipart/mixed; boundary="===============0852314131312366864==" MIME-Version: 1.0 From: Julia Lawall To: kbuild-all@lists.01.org Subject: [PATCH] ipc: fix call_kern.cocci warnings Date: Mon, 15 Jun 2020 13:53:54 +0200 Message-ID: List-Id: --===============0852314131312366864== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: kernel test robot 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") CC: Matthew Wilcox (Oracle) Signed-off-by: kernel test robot Signed-off-by: Julia Lawall --- 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 =3D xas_error(&xas); @@ -250,7 +250,7 @@ static inline int ipc_id_alloc(struct ip new->id =3D get_restore_id(ids); new->seq =3D ipcid_to_seqx(new->id); idx =3D ipcid_to_idx(new->id); - err =3D xa_insert(&ids->ipcs, idx, new, GFP_KERNEL); + err =3D xa_insert(&ids->ipcs, idx, new, GFP_ATOMIC); if (err =3D=3D -EBUSY) err =3D -ENOSPC; set_restore_id(ids, -1); --===============0852314131312366864==--