# 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/m68k-linux/bin/m68k-linux-gcc --version # < git log --format=%s --max-count=1 f0a7d1883d9f78ae7bf15fc258bf9a2b20f35b76 # < make -s -j 120 ARCH=m68k O=/kisskb/build/linus_sun3_defconfig_m68k CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/m68k-linux/bin/m68k-linux- sun3_defconfig WARNING: unmet direct dependencies detected for NEED_MULTIPLE_NODES Depends on [n]: DISCONTIGMEM [=n] || NUMA Selected by [y]: - SINGLE_MEMORY_CHUNK [=y] && MMU [=y] WARNING: unmet direct dependencies detected for NEED_MULTIPLE_NODES Depends on [n]: DISCONTIGMEM [=n] || NUMA Selected by [y]: - SINGLE_MEMORY_CHUNK [=y] && MMU [=y] WARNING: unmet direct dependencies detected for NEED_MULTIPLE_NODES Depends on [n]: DISCONTIGMEM [=n] || NUMA Selected by [y]: - SINGLE_MEMORY_CHUNK [=y] && MMU [=y] # make -s -j 120 ARCH=m68k O=/kisskb/build/linus_sun3_defconfig_m68k CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/m68k-linux/bin/m68k-linux- :1239:2: warning: #warning syscall seccomp not implemented [-Wcpp] :1317:2: warning: #warning syscall pkey_mprotect not implemented [-Wcpp] :1320:2: warning: #warning syscall pkey_alloc not implemented [-Wcpp] :1323:2: warning: #warning syscall pkey_free not implemented [-Wcpp] :1332:2: warning: #warning syscall io_pgetevents not implemented [-Wcpp] :1335:2: warning: #warning syscall rseq not implemented [-Wcpp] /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/kernel/acct.c: In function 'acct_pin_kill': /kisskb/src/kernel/acct.c:177:2: warning: value computed is not used [-Wunused-value] /kisskb/src/ipc/shm.c: In function 'ksys_shmdt': /kisskb/src/ipc/shm.c:1686:59: warning: 'file' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/lib/mpi/mpicoder.c: In function 'mpi_read_raw_from_sgl': /kisskb/src/lib/mpi/mpicoder.c:336:12: warning: 'buff' 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/net/ethernet/i825xx/sun3_82586.c: In function 'sun3_82586_timeout': /kisskb/src/drivers/net/ethernet/i825xx/sun3_82586.c:993:89: warning: array subscript is above array bounds [-Warray-bounds] /kisskb/src/fs/ocfs2/file.c: In function 'ocfs2_file_write_iter': /kisskb/src/fs/ocfs2/file.c:2386:3: warning: value computed is not used [-Wunused-value] /kisskb/src/drivers/net/macsec.c: In function 'macsec_del_rxsa': /kisskb/src/drivers/net/macsec.c:1926:2: warning: 'assoc_num' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/net/macsec.c:1926:2: warning: 'rx_sc' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/net/macsec.c: In function 'macsec_del_txsa': /kisskb/src/drivers/net/macsec.c:2003:2: warning: 'assoc_num' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/net/macsec.c:2003:2: warning: 'tx_sc' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/net/macsec.c: In function 'macsec_upd_txsa': /kisskb/src/drivers/net/macsec.c:2068:5: warning: 'assoc_num' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/net/macsec.c:2068:24: warning: 'tx_sc' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/net/macsec.c:2069:21: warning: 'secy' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/net/core/gen_stats.c: In function '__gnet_stats_copy_basic': /kisskb/src/net/core/gen_stats.c:161:19: warning: 'seq' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/udf/unicode.c: In function 'udf_name_conv_char': /kisskb/src/fs/udf/unicode.c:132:8: warning: 'c' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/net/tun.c: In function 'tun_get_user': /kisskb/src/drivers/net/tun.c:1794:30: warning: 'copylen' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/net/tun.c:1504:31: warning: 'linear' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/net/tun.c:1704:46: note: 'linear' was declared here /kisskb/src/fs/posix_acl.c: In function 'get_acl': /kisskb/src/fs/posix_acl.c:147:3: warning: value computed is not used [-Wunused-value] /kisskb/src/lib/rhashtable.c: In function 'rht_deferred_worker': /kisskb/src/lib/rhashtable.c:264:2: warning: 'next' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/lib/rhashtable.c:229:28: note: 'next' was declared here /kisskb/src/net/core/dev.c: In function 'validate_xmit_skb_list': /kisskb/src/net/core/dev.c:3365:15: warning: 'tail' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/net/core/filter.c: In function 'bpf_clear_redirect_map': /kisskb/src/net/core/filter.c:3268:4: warning: value computed is not used [-Wunused-value] /kisskb/src/net/sctp/output.c: In function 'sctp_packet_config': /kisskb/src/include/net/sock.h:1926:19: warning: 'sk' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/net/sctp/output.c:94:15: note: 'sk' was declared here Completed OK # rm -rf /kisskb/build/linus_sun3_defconfig_m68k # Build took: 0:00:25.218801