# git rev-parse -q --verify 4cb682964706deffb4861f0a91329ab3a705039f^{commit} 4cb682964706deffb4861f0a91329ab3a705039f already have revision, skipping fetch # git checkout -q -f -B kisskb 4cb682964706deffb4861f0a91329ab3a705039f # git clean -qxdf # < git log -1 # commit 4cb682964706deffb4861f0a91329ab3a705039f # Author: David Howells # Date: Tue Dec 8 23:52:03 2020 +0000 # # afs: Fix memory leak when mounting with multiple source parameters # # There's a memory leak in afs_parse_source() whereby multiple source= # parameters overwrite fc->source in the fs_context struct without freeing # the previously recorded source. # # Fix this by only permitting a single source parameter and rejecting with # an error all subsequent ones. # # This was caught by syzbot with the kernel memory leak detector, showing # something like the following trace: # # unreferenced object 0xffff888114375440 (size 32): # comm "repro", pid 5168, jiffies 4294923723 (age 569.948s) # backtrace: # slab_post_alloc_hook+0x42/0x79 # __kmalloc_track_caller+0x125/0x16a # kmemdup_nul+0x24/0x3c # vfs_parse_fs_string+0x5a/0xa1 # generic_parse_monolithic+0x9d/0xc5 # do_new_mount+0x10d/0x15a # do_mount+0x5f/0x8e # __do_sys_mount+0xff/0x127 # do_syscall_64+0x2d/0x3a # entry_SYSCALL_64_after_hwframe+0x44/0xa9 # # Fixes: 13fcc6837049 ("afs: Add fs_context support") # Reported-by: syzbot+86dc6632faaca40133ab@syzkaller.appspotmail.com # Signed-off-by: David Howells # cc: Randy Dunlap # Signed-off-by: Linus Torvalds # < /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/s390-linux/bin/s390-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/s390-linux/bin/s390-linux-ld --version # < git log --format=%s --max-count=1 4cb682964706deffb4861f0a91329ab3a705039f # < make -s -j 24 ARCH=s390 O=/kisskb/build/linus_s390-allyesconfig_s390x-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/s390-linux/bin/s390-linux- allyesconfig # Added to kconfig CONFIG_BUILD_DOCSRC=n # Added to kconfig CONFIG_MODULE_SIG=n # < make -s -j 24 ARCH=s390 O=/kisskb/build/linus_s390-allyesconfig_s390x-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/s390-linux/bin/s390-linux- help # make -s -j 24 ARCH=s390 O=/kisskb/build/linus_s390-allyesconfig_s390x-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/s390-linux/bin/s390-linux- olddefconfig # make -s -j 24 ARCH=s390 O=/kisskb/build/linus_s390-allyesconfig_s390x-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/s390-linux/bin/s390-linux- /kisskb/src/drivers/gpu/drm/rockchip/cdn-dp-core.c:1124:12: warning: 'cdn_dp_resume' defined but not used [-Wunused-function] static int cdn_dp_resume(struct device *dev) ^~~~~~~~~~~~~ /kisskb/src/drivers/input/joystick/analog.c:160:2: warning: #warning Precise timer not defined for this architecture. [-Wcpp] #warning Precise timer not defined for this architecture. ^~~~~~~ In file included from /kisskb/src/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c:42: /kisskb/src/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c: In function 'mvpp2_setup_bm_pool': /kisskb/src/drivers/net/ethernet/marvell/mvpp2/mvpp2.h:760:2: warning: overflow in conversion from 'long unsigned int' to 'int' changes value from '18446744073709551584' to '-32' [-Woverflow] ((total_size) - MVPP2_SKB_HEADROOM - MVPP2_SKB_SHINFO_SIZE) ^ /kisskb/src/drivers/net/ethernet/marvell/mvpp2/mvpp2.h:864:33: note: in expansion of macro 'MVPP2_RX_MAX_PKT_SIZE' #define MVPP2_BM_SHORT_PKT_SIZE MVPP2_RX_MAX_PKT_SIZE(MVPP2_BM_SHORT_FRAME_SIZE) ^~~~~~~~~~~~~~~~~~~~~ /kisskb/src/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c:647:41: note: in expansion of macro 'MVPP2_BM_SHORT_PKT_SIZE' mvpp2_pools[MVPP2_BM_SHORT].pkt_size = MVPP2_BM_SHORT_PKT_SIZE; ^~~~~~~~~~~~~~~~~~~~~~~ Completed OK # rm -rf /kisskb/build/linus_s390-allyesconfig_s390x-gcc8 # Build took: 0:23:50.762190