# git rev-parse -q --verify f0a7d1883d9f78ae7bf15fc258bf9a2b20f35b76^{commit} f0a7d1883d9f78ae7bf15fc258bf9a2b20f35b76 already have revision, skipping fetch # git checkout -q -f -B kisskb f0a7d1883d9f78ae7bf15fc258bf9a2b20f35b76 # git clean -qxdf # < git log -1 # commit f0a7d1883d9f78ae7bf15fc258bf9a2b20f35b76 # Author: David Howells # Date: Mon Oct 15 12:43:02 2018 +0100 # # afs: Fix clearance of reply # # The recent patch to fix the afs_server struct leak didn't actually fix the # bug, but rather fixed some of the symptoms. The problem is that an # asynchronous call that holds a resource pointed to by call->reply[0] will # find the pointer cleared in the call destructor, thereby preventing the # resource from being cleaned up. # # In the case of the server record leak, the afs_fs_get_capabilities() # function in devel code sets up a call with reply[0] pointing at the server # record that should be altered when the result is obtained, but this was # being cleared before the destructor was called, so the put in the # destructor does nothing and the record is leaked. # # Commit f014ffb025c1 removed the additional ref obtained by # afs_install_server(), but the removal of this ref is actually used by the # garbage collector to mark a server record as being defunct after the record # has expired through lack of use. # # The offending clearance of call->reply[0] upon completion in # afs_process_async_call() has been there from the origin of the code, but # none of the asynchronous calls actually use that pointer currently, so it # should be safe to remove (note that synchronous calls don't involve this # function). # # Fix this by the following means: # # (1) Revert commit f014ffb025c1. # # (2) Remove the clearance of reply[0] from afs_process_async_call(). # # Without this, afs_manage_servers() will suffer an assertion failure if it # sees a server record that didn't get used because the usage count is not 1. # # Fixes: f014ffb025c1 ("afs: Fix afs_server struct leak") # Fixes: 08e0e7c82eea ("[AF_RXRPC]: Make the in-kernel AFS filesystem use AF_RXRPC.") # Signed-off-by: David Howells # Cc: stable # Signed-off-by: Greg Kroah-Hartman # < /opt/cross/kisskb/gcc-4.6.3-nolibc/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc --version # < git log --format=%s --max-count=1 f0a7d1883d9f78ae7bf15fc258bf9a2b20f35b76 # < make -s -j 120 ARCH=arm O=/kisskb/build/linus_omap2plus_defconfig_arm CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi- omap2plus_defconfig # make -s -j 120 ARCH=arm O=/kisskb/build/linus_omap2plus_defconfig_arm CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi- /kisskb/src/arch/arm/crypto/Makefile:37: These ARMv8 Crypto Extensions modules need binutils 2.23 or higher /kisskb/src/arch/arm/crypto/Makefile:38: ghash-arm-ce.o /kisskb/src/kernel/rcu/srcutree.c: In function 'init_srcu_struct_fields': /kisskb/src/kernel/rcu/srcutree.c:148:32: warning: 'levelspread[]' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/kernel/rcu/srcutree.c:96:6: note: 'levelspread[]' was declared here /kisskb/src/kernel/cgroup/cgroup-v1.c: In function 'cgroup1_mount': /kisskb/src/kernel/cgroup/cgroup-v1.c:1256:20: warning: 'root' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/kernel/printk/printk.c: In function 'devkmsg_sysctl_set_loglvl': /kisskb/src/kernel/printk/printk.c:185:16: warning: 'old' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/base/regmap/regmap.c: In function 'regmap_raw_read': /kisskb/src/drivers/base/regmap/regmap.c:2511:6: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/base/regmap/regmap.c: In function '_regmap_raw_write': /kisskb/src/drivers/base/regmap/regmap.c:1833:6: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/proc/inode.c: In function 'proc_reg_open': /kisskb/src/include/linux/list.h:65:12: warning: 'pdeo' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/proc/inode.c:341:21: note: 'pdeo' was declared here /kisskb/src/drivers/dma-buf/reservation.c: In function 'reservation_object_add_shared_fence': /kisskb/src/drivers/dma-buf/reservation.c:226:6: warning: 'k' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/i2c/i2c-core-base.c: In function 'i2c_generic_scl_recovery': /kisskb/src/drivers/i2c/i2c-core-base.c:235:5: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/net/mac80211/mlme.c: In function 'ieee80211_rx_mgmt_beacon': /kisskb/src/net/mac80211/mlme.c:1511:3: warning: 'pwr_level_cisco' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/net/mac80211/mlme.c:1468:6: note: 'pwr_level_cisco' was declared here Completed OK # rm -rf /kisskb/build/linus_omap2plus_defconfig_arm # Build took: 0:01:55.980913