# git rev-parse -q --verify d888c83fcec75194a8a48ccd283953bdba7b2550^{commit} d888c83fcec75194a8a48ccd283953bdba7b2550 already have revision, skipping fetch # git checkout -q -f -B kisskb d888c83fcec75194a8a48ccd283953bdba7b2550 # git clean -qxdf # < git log -1 # commit d888c83fcec75194a8a48ccd283953bdba7b2550 # Author: Linus Torvalds # Date: Tue Mar 29 23:29:18 2022 -0700 # # fs: fix fd table size alignment properly # # Jason Donenfeld reports that my commit 1c24a186398f ("fs: fd tables have # to be multiples of BITS_PER_LONG") doesn't work, and the reason is an # embarrassing brown-paper-bag bug. # # Yes, we want to align the number of fds to BITS_PER_LONG, and yes, the # reason they might not be aligned is because the incoming 'max_fd' # argument might not be aligned. # # But aligining the argument - while simple - will cause a "infinitely # big" maxfd (eg NR_OPEN_MAX) to just overflow to zero. Which most # definitely isn't what we want either. # # The obvious fix was always just to do the alignment last, but I had # moved it earlier just to make the patch smaller and the code look # simpler. Duh. It certainly made _me_ look simple. # # Fixes: 1c24a186398f ("fs: fd tables have to be multiples of BITS_PER_LONG") # Reported-and-tested-by: Jason A. Donenfeld # Cc: Fedor Pchelkin # Cc: Alexey Khoroshilov # Cc: Christian Brauner # Signed-off-by: Linus Torvalds # < /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/m68k-linux/bin/m68k-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-8.1.0-nolibc/m68k-linux/bin/m68k-linux-ld --version # < git log --format=%s --max-count=1 d888c83fcec75194a8a48ccd283953bdba7b2550 # < make -s -j 48 ARCH=m68k O=/kisskb/build/linus_sun3_defconfig_m68k-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/m68k-linux/bin/m68k-linux- sun3_defconfig # < make -s -j 48 ARCH=m68k O=/kisskb/build/linus_sun3_defconfig_m68k-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/m68k-linux/bin/m68k-linux- help # make -s -j 48 ARCH=m68k O=/kisskb/build/linus_sun3_defconfig_m68k-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/m68k-linux/bin/m68k-linux- olddefconfig # make -s -j 48 ARCH=m68k O=/kisskb/build/linus_sun3_defconfig_m68k-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/m68k-linux/bin/m68k-linux- In file included from /kisskb/src/include/linux/swab.h:5, from /kisskb/src/include/uapi/linux/byteorder/big_endian.h:14, from /kisskb/src/include/linux/byteorder/big_endian.h:5, from /kisskb/src/arch/m68k/include/uapi/asm/byteorder.h:5, from /kisskb/src/include/asm-generic/bitops/le.h:6, from /kisskb/src/arch/m68k/include/asm/bitops.h:529, from /kisskb/src/include/linux/bitops.h:33, from /kisskb/src/include/linux/kernel.h:22, from /kisskb/src/drivers/net/ethernet/i825xx/sun3_82586.c:31: /kisskb/src/drivers/net/ethernet/i825xx/sun3_82586.c: In function 'sun3_82586_timeout': /kisskb/src/drivers/net/ethernet/i825xx/sun3_82586.c:989:108: warning: array subscript 1 is above array bounds of 'volatile struct transmit_cmd_struct *[1]' [-Warray-bounds] printk("%s: command-stats: %04x %04x\n",dev->name,swab16(p->xmit_cmds[0]->cmd_status),swab16(p->xmit_cmds[1]->cmd_status)); ~~~~~~~~~~~~^~~ /kisskb/src/include/uapi/linux/swab.h:107:12: note: in definition of macro '__swab16' __fswab16(x)) ^ /kisskb/src/include/linux/printk.h:446:26: note: in expansion of macro 'printk_index_wrap' #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__) ^~~~~~~~~~~~~~~~~ /kisskb/src/drivers/net/ethernet/i825xx/sun3_82586.c:989:3: note: in expansion of macro 'printk' printk("%s: command-stats: %04x %04x\n",dev->name,swab16(p->xmit_cmds[0]->cmd_status),swab16(p->xmit_cmds[1]->cmd_status)); ^~~~~~ Completed OK # rm -rf /kisskb/build/linus_sun3_defconfig_m68k-gcc8 # Build took: 0:02:05.497903