All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cfg80211: Use correct GFP_ mask in cfg80211_del_sta_sinfo()
@ 2018-05-16  8:48 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2018-05-16  8:48 UTC (permalink / raw)
  To: Johannes Berg, Toke Høiland-Jørgensen
  Cc: linux-wireless, kernel-janitors

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;

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] cfg80211: Use correct GFP_ mask in cfg80211_del_sta_sinfo()
@ 2018-05-16  8:48 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2018-05-16  8:48 UTC (permalink / raw)
  To: Johannes Berg, Toke Høiland-Jørgensen
  Cc: linux-wireless, kernel-janitors

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;

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] cfg80211: Use correct GFP_ mask in cfg80211_del_sta_sinfo()
  2018-05-16  8:48 ` Dan Carpenter
@ 2018-05-16  9:25   ` Toke Høiland-Jørgensen
  -1 siblings, 0 replies; 4+ messages in thread
From: Toke Høiland-Jørgensen @ 2018-05-16  9:25 UTC (permalink / raw)
  To: Dan Carpenter, Johannes Berg; +Cc: linux-wireless, kernel-janitors

Dan Carpenter <dan.carpenter@oracle.com> writes:

> 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 usersp=
ace")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Ah, right, didn't notice that that was supposed to be a gfp value.
Thanks for the fix :)

Acked-by: Toke H=C3=B8iland-J=C3=B8rgensen <toke@toke.dk>


-Toke

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] cfg80211: Use correct GFP_ mask in cfg80211_del_sta_sinfo()
@ 2018-05-16  9:25   ` Toke Høiland-Jørgensen
  0 siblings, 0 replies; 4+ messages in thread
From: Toke Høiland-Jørgensen @ 2018-05-16  9:25 UTC (permalink / raw)
  To: Dan Carpenter, Johannes Berg; +Cc: linux-wireless, kernel-janitors

Dan Carpenter <dan.carpenter@oracle.com> writes:

> 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>

Ah, right, didn't notice that that was supposed to be a gfp value.
Thanks for the fix :)

Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>


-Toke

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-05-16  9:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-16  8:48 [PATCH] cfg80211: Use correct GFP_ mask in cfg80211_del_sta_sinfo() Dan Carpenter
2018-05-16  8:48 ` Dan Carpenter
2018-05-16  9:25 ` Toke Høiland-Jørgensen
2018-05-16  9:25   ` Toke Høiland-Jørgensen

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.