Skip to content

Commit

Permalink
staging: r8712u: Tracking kmemleak false positives.
Browse files Browse the repository at this point in the history
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: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Ali Bahar <ali@internetDog.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Larry Finger authored and Greg Kroah-Hartman committed Sep 7, 2011
1 parent 93c55dd commit 5d3da4a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/staging/rtl8712/rtl871x_recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 +
Expand Down

0 comments on commit 5d3da4a

Please sign in to comment.