Re: WARNING: kmalloc bug in krealloc

From: Tetsuo Handa
Date: Mon Jul 16 2018 - 03:18:39 EST


This looks like a v9fs bug. xattrwalk is returning bogus return value.

[ 30.321571] v9fs_xattr_get(): name = security.capability buffer = (null) value_len = 0
[ 30.323819] >>> TXATTRWALK file_fid 1, attr_fid 2 name security.capability
[ 30.326132] <<< RXATTRWALK fid 2 size 17441174723711270912
[ 30.327667] attr_size=17441174723711270912 buffer_size=0 retval=-1005569349998280704
[ 30.329684] vfs_getxattr_alloc(): value= (null) error=5570560 xattr_size=24
[ 30.331610] WARNING: CPU: 2 PID: 8807 at mm/slab_common.c:1031 kmalloc_slab+0x56/0x70

-1005569349998280704 is 0xF20B800100550000, and taking lower 32bits of F20B800100550000 is
0x550000 which is 5570560, which is too large size for kmalloc().