From: Dan Carpenter <dan.carpenter@oracle.com> To: "Johannes Berg" <johannes@sipsolutions.net>, "Toke Høiland-Jørgensen" <toke@toke.dk> Cc: linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] cfg80211: Use correct GFP_ mask in cfg80211_del_sta_sinfo() Date: Wed, 16 May 2018 11:48:37 +0300 [thread overview] Message-ID: <20180516084836.GB23043@mwanda> (raw) Smatch complains that we should use the passed in "gfp" instead of hard coding GFP_KERNEL. I looked at some of the callers and this would probably be a bug for rtw_cfg80211_indicate_sta_disassoc() which uses GFP_ATOMIC and a NULL "sinfo". Fixes: 52539ca89f36 ("cfg80211: Expose TXQ stats and parameters to userspace") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index afbe5105bf7f..3eb645b81777 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -14644,7 +14644,7 @@ void cfg80211_del_sta_sinfo(struct net_device *dev, const u8 *mac_addr, struct station_info *empty_sinfo = NULL; if (!sinfo) { - empty_sinfo = kzalloc(sizeof(*empty_sinfo), GFP_KERNEL); + empty_sinfo = kzalloc(sizeof(*empty_sinfo), gfp); if (!empty_sinfo) return; sinfo = empty_sinfo;
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com> To: "Johannes Berg" <johannes@sipsolutions.net>, "Toke Høiland-Jørgensen" <toke@toke.dk> Cc: linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] cfg80211: Use correct GFP_ mask in cfg80211_del_sta_sinfo() Date: Wed, 16 May 2018 08:48:37 +0000 [thread overview] Message-ID: <20180516084836.GB23043@mwanda> (raw) Smatch complains that we should use the passed in "gfp" instead of hard coding GFP_KERNEL. I looked at some of the callers and this would probably be a bug for rtw_cfg80211_indicate_sta_disassoc() which uses GFP_ATOMIC and a NULL "sinfo". Fixes: 52539ca89f36 ("cfg80211: Expose TXQ stats and parameters to userspace") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index afbe5105bf7f..3eb645b81777 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -14644,7 +14644,7 @@ void cfg80211_del_sta_sinfo(struct net_device *dev, const u8 *mac_addr, struct station_info *empty_sinfo = NULL; if (!sinfo) { - empty_sinfo = kzalloc(sizeof(*empty_sinfo), GFP_KERNEL); + empty_sinfo = kzalloc(sizeof(*empty_sinfo), gfp); if (!empty_sinfo) return; sinfo = empty_sinfo;
next reply other threads:[~2018-05-16 8:48 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-05-16 8:48 Dan Carpenter [this message] 2018-05-16 8:48 ` [PATCH] cfg80211: Use correct GFP_ mask in cfg80211_del_sta_sinfo() Dan Carpenter 2018-05-16 9:25 ` Toke Høiland-Jørgensen 2018-05-16 9:25 ` Toke Høiland-Jørgensen
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=20180516084836.GB23043@mwanda \ --to=dan.carpenter@oracle.com \ --cc=johannes@sipsolutions.net \ --cc=kernel-janitors@vger.kernel.org \ --cc=linux-wireless@vger.kernel.org \ --cc=toke@toke.dk \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.