From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: linux-s390@vger.kernel.org
Cc: Julian Wiedmann <jwi@linux.ibm.com>,
Karsten Graul <kgraul@linux.ibm.com>,
Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Thomas Gleixner <tglx@linutronix.de>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: [PATCH 4/6] s390/ctcm: Use explicit allocation mask in ctcmpc_unpack_skb().
Date: Wed, 18 Nov 2020 11:53:15 +0100 [thread overview]
Message-ID: <20201118105317.605671-5-bigeasy@linutronix.de> (raw)
In-Reply-To: <20201118105317.605671-1-bigeasy@linutronix.de>
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().
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
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 4ff51af44d338..38c535f016363 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, struct sk_buff *pskb)
skb_pull(pskb, new_len); /* point to next PDU */
}
} else {
- mpcginfo = kmalloc(sizeof(struct mpcg_info), gfp_type());
+ mpcginfo = kmalloc(sizeof(struct mpcg_info), GFP_ATOMIC);
if (mpcginfo == NULL)
goto done;
--
2.29.2
next prev parent reply other threads:[~2020-11-18 10:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-18 10:53 [PATCH 0/6] s390/ctcm: Remove gfp_type() usage Sebastian Andrzej Siewior
2020-11-18 10:53 ` [PATCH 1/6] s390/ctcm: Put struct th_header and th_sweep on stack Sebastian Andrzej Siewior
2020-11-19 7:45 ` Julian Wiedmann
2020-11-19 8:12 ` Sebastian Andrzej Siewior
2020-11-19 8:16 ` Julian Wiedmann
2020-11-19 9:37 ` Sebastian Andrzej Siewior
2020-11-18 10:53 ` [PATCH 2/6] s390/ctcm: Put struct qllc " Sebastian Andrzej Siewior
2020-11-19 7:56 ` Julian Wiedmann
2020-11-18 10:53 ` [PATCH 3/6] s390/ctcm: Put struct pdu " Sebastian Andrzej Siewior
2020-11-19 7:52 ` Julian Wiedmann
2020-11-18 10:53 ` Sebastian Andrzej Siewior [this message]
2020-11-19 7:28 ` [PATCH 4/6] s390/ctcm: Use explicit allocation mask in ctcmpc_unpack_skb() Julian Wiedmann
2020-11-18 10:53 ` [PATCH 5/6] s390/ctcm: Use GFP_KERNEL in add_channel() Sebastian Andrzej Siewior
2020-11-19 7:30 ` Julian Wiedmann
2020-11-18 10:53 ` [PATCH 6/6] s390/ctcm: Use GFP_ATOMIC in ctcmpc_tx() Sebastian Andrzej Siewior
2020-11-19 7:34 ` Julian Wiedmann
2020-11-19 8:01 ` [PATCH 0/6] s390/ctcm: Remove gfp_type() usage Julian Wiedmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201118105317.605671-5-bigeasy@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=borntraeger@de.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=jwi@linux.ibm.com \
--cc=kgraul@linux.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox