]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sdp: Fixed annoying warning by memtrack
authorAmir Vadai <amirv@mellanox.co.il>
Tue, 24 Nov 2009 07:33:53 +0000 (09:33 +0200)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 6 Oct 2015 12:04:40 +0000 (05:04 -0700)
kzalloc done in sdp_seq_open is freed by the system in a function
that memtrack can't see. Therefore it printed false warning.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
drivers/infiniband/ulp/sdp/sdp_proc.c

index 02ad8606a7abd47aee22d8e628366a703a32ed48..23f099c1f82be38ab2686f23546cc3cc39fb5043 100644 (file)
@@ -166,7 +166,11 @@ static int sdp_seq_open(struct inode *inode, struct file *file)
        if (unlikely(afinfo == NULL))
                return -EINVAL;
 
+/* Workaround bogus warning by memtrack */
+#define _kzalloc(size,flags) kzalloc(size,flags)
+#undef kzalloc
        s = kzalloc(sizeof(*s), GFP_KERNEL);
+#define kzalloc(s,f) _kzalloc(s,f)     
        if (!s)
                return -ENOMEM;
        s->family               = afinfo->family;