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

staging: r8712u: Tracking kmemleak false positives.

The frame buffers allocated in _r8712_init_recv_priv() are not tracked
by kmemleak, but they are freed when the driver is unloaded. To help
find any real leaks, these false positives are annotated for kmemleak.
Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: NAli Bahar <ali@internetDog.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 93c55dda
......@@ -28,6 +28,9 @@
#define _RTL871X_RECV_C_
#include <linux/slab.h>
#include <linux/kmemleak.h>
#include "osdep_service.h"
#include "drv_types.h"
#include "recv_osdep.h"
......@@ -73,6 +76,7 @@ sint _r8712_init_recv_priv(struct recv_priv *precvpriv,
RXFRAME_ALIGN_SZ);
if (precvpriv->pallocated_frame_buf == NULL)
return _FAIL;
kmemleak_not_leak(precvpriv->pallocated_frame_buf);
memset(precvpriv->pallocated_frame_buf, 0, NR_RECVFRAME *
sizeof(union recv_frame) + RXFRAME_ALIGN_SZ);
precvpriv->precv_frame_buf = precvpriv->pallocated_frame_buf +
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册