Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / kernel / module / debug_kmemleak.c
blobdf873dad049d604aa475bd2f6263cc2e6465fe77
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * Module kmemleak support
5 * Copyright (C) 2009 Catalin Marinas
6 */
8 #include <linux/module.h>
9 #include <linux/kmemleak.h>
10 #include "internal.h"
12 void kmemleak_load_module(const struct module *mod,
13 const struct load_info *info)
15 /* only scan writable, non-executable sections */
16 for_each_mod_mem_type(type) {
17 if (type != MOD_DATA && type != MOD_INIT_DATA &&
18 !mod->mem[type].is_rox)
19 kmemleak_no_scan(mod->mem[type].base);