提交 bc83c4cf 编写于 作者: L Larry Finger 提交者: Greg Kroah-Hartman

staging: r8188eu: Remove some false positives from kmemleak

When this driver preallocates some SKBs, kmemleak is unable to find that
allocated memory when it scans. When the driver is unloaded, that memory
is released; therefore, the report is a false positive.
Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 580b4105
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
* *
******************************************************************************/ ******************************************************************************/
#define _RTL8188EU_RECV_C_ #define _RTL8188EU_RECV_C_
#include <linux/kmemleak.h>
#include <osdep_service.h> #include <osdep_service.h>
#include <drv_types.h> #include <drv_types.h>
#include <recv_osdep.h> #include <recv_osdep.h>
...@@ -72,6 +73,7 @@ int rtl8188eu_init_recv_priv(struct adapter *padapter) ...@@ -72,6 +73,7 @@ int rtl8188eu_init_recv_priv(struct adapter *padapter)
MAX_RECVBUF_SZ + RECVBUFF_ALIGN_SZ, MAX_RECVBUF_SZ + RECVBUFF_ALIGN_SZ,
GFP_KERNEL); GFP_KERNEL);
if (pskb) { if (pskb) {
kmemleak_not_leak(pskb);
pskb->dev = padapter->pnetdev; pskb->dev = padapter->pnetdev;
tmpaddr = (size_t)pskb->data; tmpaddr = (size_t)pskb->data;
alignm = tmpaddr & (RECVBUFF_ALIGN_SZ-1); alignm = tmpaddr & (RECVBUFF_ALIGN_SZ-1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册