Return-Path: Received: from Galois.linutronix.de ([193.142.43.55]:33832 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726480AbgKSN53 (ORCPT ); Thu, 19 Nov 2020 08:57:29 -0500 From: Sebastian Andrzej Siewior Subject: [PATCH v2 4/6] s390/ctcm: Use explicit allocation mask in ctcmpc_unpack_skb(). Date: Thu, 19 Nov 2020 14:57:16 +0100 Message-Id: <20201119135719.983170-5-bigeasy@linutronix.de> In-Reply-To: <20201119135719.983170-1-bigeasy@linutronix.de> References: <20201119135719.983170-1-bigeasy@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable List-ID: To: linux-s390@vger.kernel.org Cc: Julian Wiedmann , Karsten Graul , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Thomas Gleixner , Sebastian Andrzej Siewior gfp_type() uses in_interrupt() to figure out the correct GFP mask. The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be separated or the context be conveyed in an argument passed by the caller, which usually knows the context. The call chain of ctcmpc_unpack_skb(): ctcmpc_bh() -> ctcmpc_unpack_skb() ctcmpc_bh() is a tasklet handler so GFP_ATOMIC is needed. Use GFP_ATOMIC as allocation type in ctcmpc_unpack_skb(). Reviewed-by: Julian Wiedmann Signed-off-by: Sebastian Andrzej Siewior --- drivers/s390/net/ctcm_mpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/s390/net/ctcm_mpc.c b/drivers/s390/net/ctcm_mpc.c index 76a9e0d0c0710..829deeedf21a2 100644 --- a/drivers/s390/net/ctcm_mpc.c +++ b/drivers/s390/net/ctcm_mpc.c @@ -1164,7 +1164,7 @@ static void ctcmpc_unpack_skb(struct channel *ch, str= uct sk_buff *pskb) skb_pull(pskb, new_len); /* point to next PDU */ } } else { - mpcginfo =3D kmalloc(sizeof(struct mpcg_info), gfp_type()); + mpcginfo =3D kmalloc(sizeof(struct mpcg_info), GFP_ATOMIC); if (mpcginfo =3D=3D NULL) goto done; =20 --=20 2.29.2