lkml.org 
[lkml]   [2015]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2] staging: rtl8192u: r8192U_core: Fix driver_info dereference as a null pointer
Date
Fix possible use of use of driver_info as a null pointer in
query_rxdesc_status()
This could happen if stats->RxIs40MHzPacket still has the
default value of zero.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
drivers/staging/rtl8192u/r8192U_core.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index e031a25..df43b6d 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -4474,13 +4474,10 @@ static void query_rxdesc_status(struct sk_buff *skb,
skb_pull(skb, stats->RxBufShift + stats->RxDrvInfoSize);
}

- /* for debug 2008.5.29 */
-
- //added by vivi, for MP, 20080108
- stats->RxIs40MHzPacket = driver_info->BW;
- if (stats->RxDrvInfoSize != 0)
+ if (driver_info) {
+ stats->RxIs40MHzPacket = driver_info->BW;
TranslateRxSignalStuff819xUsb(skb, stats, driver_info);
-
+ }
}

static void rtl8192_rx_nomal(struct sk_buff *skb)
--
1.7.10.4


\
 
 \ /
  Last update: 2015-02-07 16:01    [W:0.040 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site