mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 06:32:08 +00:00
kmemleak: Remove some of the kmemleak false positives
There are allocations for which the main pointer cannot be found but they are not memory leaks. This patch fixes some of them. For more information on false positives, see Documentation/kmemleak.txt. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
This commit is contained in:
parent
4f2294b6dc
commit
2e1483c995
3 changed files with 18 additions and 0 deletions
|
@ -25,6 +25,7 @@
|
|||
#include <linux/uio.h>
|
||||
#include <linux/namei.h>
|
||||
#include <linux/log2.h>
|
||||
#include <linux/kmemleak.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include "internal.h"
|
||||
|
||||
|
@ -492,6 +493,11 @@ void __init bdev_cache_init(void)
|
|||
bd_mnt = kern_mount(&bd_type);
|
||||
if (IS_ERR(bd_mnt))
|
||||
panic("Cannot create bdev pseudo-fs");
|
||||
/*
|
||||
* This vfsmount structure is only used to obtain the
|
||||
* blockdev_superblock, so tell kmemleak not to report it.
|
||||
*/
|
||||
kmemleak_not_leak(bd_mnt);
|
||||
blockdev_superblock = bd_mnt->mnt_sb; /* For writeback */
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue