* [PATCH] ath6kl: fix null skb dereference in ath6kl_rx()
@ 2011-10-06 11:32 Kalle Valo
2011-10-11 11:23 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Kalle Valo @ 2011-10-06 11:32 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless
smatch found that skb might be null in some cases in ath6kl_rx():
ath6kl/txrx.c +1252 ath6kl_rx(222) error: potential null derefence 'skb'.
This will happen when ath6kl is in AP mode and two clients send traffic
to each other.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath6kl/txrx.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c
index bcf7b01..a9dff01 100644
--- a/drivers/net/wireless/ath/ath6kl/txrx.c
+++ b/drivers/net/wireless/ath/ath6kl/txrx.c
@@ -1247,6 +1247,11 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet)
}
if (skb1)
ath6kl_data_tx(skb1, ar->net_dev);
+
+ if (skb == NULL) {
+ /* nothing to deliver up the stack */
+ return;
+ }
}
datap = (struct ethhdr *) skb->data;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ath6kl: fix null skb dereference in ath6kl_rx()
2011-10-06 11:32 [PATCH] ath6kl: fix null skb dereference in ath6kl_rx() Kalle Valo
@ 2011-10-11 11:23 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2011-10-11 11:23 UTC (permalink / raw)
To: Kalle Valo; +Cc: linux-wireless
On 10/06/2011 02:32 PM, Kalle Valo wrote:
> smatch found that skb might be null in some cases in ath6kl_rx():
>
> ath6kl/txrx.c +1252 ath6kl_rx(222) error: potential null derefence 'skb'.
>
> This will happen when ath6kl is in AP mode and two clients send traffic
> to each other.
Applied to ath6kl.git.
Kalle
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-10-11 11:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-06 11:32 [PATCH] ath6kl: fix null skb dereference in ath6kl_rx() Kalle Valo
2011-10-11 11:23 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).