Re: [PATCH 3/3] fs: fsnotify: account fsnotify metadata to kmemcg

From: kbuild test robot
Date: Tue Feb 20 2018 - 20:26:16 EST


Hi Shakeel,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on mmotm/master]
[also build test ERROR on next-20180220]
[cannot apply to linus/master v4.16-rc2]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Shakeel-Butt/Directed-kmem-charging/20180221-071026
base: git://git.cmpxchg.org/linux-mmotm.git master
config: i386-randconfig-n0-201807 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386

All errors (new ones prefixed by >>):

init/initramfs.o: In function `kmalloc_memcg':
include/linux/slab.h:588: undefined reference to `__kmalloc_memcg'
include/linux/slab.h:588: undefined reference to `__kmalloc_memcg'
arch/x86/events/core.o: In function `kmalloc_memcg':
include/linux/slab.h:588: undefined reference to `__kmalloc_memcg'
include/linux/slab.h:588: undefined reference to `__kmalloc_memcg'
arch/x86/kernel/ksysfs.o: In function `kmalloc_memcg':
include/linux/slab.h:588: undefined reference to `__kmalloc_memcg'
arch/x86/kernel/e820.o:include/linux/slab.h:588: more undefined references to `__kmalloc_memcg' follow
fs/notify/fanotify/fanotify.o: In function `fanotify_alloc_event':
>> fs/notify/fanotify/fanotify.c:159: undefined reference to `kmem_cache_alloc_memcg'
fs/eventpoll.o: In function `kmalloc_memcg':
include/linux/slab.h:588: undefined reference to `__kmalloc_memcg'
fs/signalfd.o: In function `kmalloc_memcg':
include/linux/slab.h:588: undefined reference to `__kmalloc_memcg'
fs/timerfd.o: In function `kmalloc_memcg':
include/linux/slab.h:588: undefined reference to `__kmalloc_memcg'
include/linux/slab.h:588: undefined reference to `__kmalloc_memcg'
fs/eventfd.o: In function `kmalloc_memcg':
include/linux/slab.h:588: undefined reference to `__kmalloc_memcg'
fs/userfaultfd.o:include/linux/slab.h:588: more undefined references to `__kmalloc_memcg' follow

vim +159 fs/notify/fanotify/fanotify.c

141
142 struct fanotify_event_info *fanotify_alloc_event(struct inode *inode, u32 mask,
143 const struct path *path,
144 struct mem_cgroup *memcg)
145 {
146 struct fanotify_event_info *event;
147
148 if (fanotify_is_perm_event(mask)) {
149 struct fanotify_perm_event_info *pevent;
150
151 pevent = kmem_cache_alloc_memcg(fanotify_perm_event_cachep,
152 GFP_KERNEL, memcg);
153 if (!pevent)
154 return NULL;
155 event = &pevent->fae;
156 pevent->response = 0;
157 goto init;
158 }
> 159 event = kmem_cache_alloc_memcg(fanotify_event_cachep, GFP_KERNEL,
160 memcg);
161 if (!event)
162 return NULL;
163 init: __maybe_unused
164 fsnotify_init_event(&event->fse, inode, mask);
165 event->tgid = get_pid(task_tgid(current));
166 if (path) {
167 event->path = *path;
168 path_get(&event->path);
169 } else {
170 event->path.mnt = NULL;
171 event->path.dentry = NULL;
172 }
173 return event;
174 }
175

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip