# 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/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < git log --format=%s --max-count=1 f0a7d1883d9f78ae7bf15fc258bf9a2b20f35b76 # < make -s -j 120 ARCH=powerpc O=/kisskb/build/linus-rand_randconfig+ppc64le_ppc64le-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- randconfig KCONFIG_SEED=0x848851CB WARNING: unmet direct dependencies detected for FSL_EMB_PERFMON Depends on [n]: E500 [=n] || PPC_83xx [=n] Selected by [y]: - PPC_FSL_BOOK3E [=y] WARNING: unmet direct dependencies detected for FSL_EMB_PERFMON Depends on [n]: E500 [=n] || PPC_83xx [=n] Selected by [y]: - PPC_FSL_BOOK3E [=y] # Added to kconfig CONFIG_STANDALONE=y # Added to kconfig CONFIG_BUILD_DOCSRC=n # Added to kconfig CONFIG_MODULE_SIG=n # Added to kconfig CONFIG_CPU_BIG_ENDIAN=n # Added to kconfig CONFIG_CPU_LITTLE_ENDIAN=y # Added to kconfig CONFIG_PPC64=y # Added to kconfig CONFIG_PPC_BOOK3E_64=n # Added to kconfig CONFIG_PPC_BOOK3S_64=y # Added to kconfig CONFIG_PPC_DISABLE_WERROR=y # Added to kconfig CONFIG_SECTION_MISMATCH_WARN_ONLY=y # Added to kconfig CONFIG_PREVENT_FIRMWARE_BUILD=y # Added to kconfig CONFIG_LD_HEAD_STUB_CATCH=y # yes \n | make -s -j 120 ARCH=powerpc O=/kisskb/build/linus-rand_randconfig+ppc64le_ppc64le-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- oldconfig yes: standard output: Broken pipe # make -s -j 120 ARCH=powerpc O=/kisskb/build/linus-rand_randconfig+ppc64le_ppc64le-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- /kisskb/src/arch/powerpc/kernel/eeh.c:1752:12: warning: 'proc_eeh_show' defined but not used [-Wunused-function] static int proc_eeh_show(struct seq_file *m, void *v) ^ /kisskb/src/fs/jffs2/xattr.c: In function 'jffs2_build_xattr_subsystem': /kisskb/src/fs/jffs2/xattr.c:887:1: warning: the frame size of 1072 bytes is larger than 1024 bytes [-Wframe-larger-than=] } ^ /kisskb/src/scripts/unifdef.c: In function 'Mpass': /kisskb/src/scripts/unifdef.c:453:28: warning: 'strncpy' output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation] static void Mpass (void) { strncpy(keyword, "if ", 4); Pelif(); } ^~~~~~~~~~~~~~~~~~~~~~~~~~~ WARNING: vmlinux.o(.text+0x295c): Section mismatch in reference from the variable __boot_from_prom to the function .init.text:prom_init() The function __boot_from_prom() references the function __init prom_init(). This is often because __boot_from_prom lacks a __init annotation or the annotation of prom_init is wrong. WARNING: vmlinux.o(.text+0x2b38): Section mismatch in reference from the variable start_here_multiplatform to the function .init.text:early_setup() The function start_here_multiplatform() references the function __init early_setup(). This is often because start_here_multiplatform lacks a __init annotation or the annotation of early_setup is wrong. WARNING: vmlinux.o(.text+0x2b6c): Section mismatch in reference from the variable start_here_common to the function .init.text:start_kernel() The function start_here_common() references the function __init start_kernel(). This is often because start_here_common lacks a __init annotation or the annotation of start_kernel is wrong. Completed OK # rm -rf /kisskb/build/linus-rand_randconfig+ppc64le_ppc64le-gcc5 # Build took: 0:00:49.232508