# git rev-parse -q --verify 2be7d348fe924f0c5583c6a805bd42cecda93104^{commit} 2be7d348fe924f0c5583c6a805bd42cecda93104 already have revision, skipping fetch # git checkout -q -f -B kisskb 2be7d348fe924f0c5583c6a805bd42cecda93104 # git clean -qxdf # < git log -1 # commit 2be7d348fe924f0c5583c6a805bd42cecda93104 # Author: Linus Torvalds # Date: Tue Nov 26 11:34:06 2019 -0800 # # Revert "vfs: properly and reliably lock f_pos in fdget_pos()" # # This reverts commit 0be0ee71816b2b6725e2b4f32ad6726c9d729777. # # I was hoping it would be benign to switch over entirely to FMODE_STREAM, # and we'd have just a couple of small fixups we'd need, but it looks like # we're not quite there yet. # # While it worked fine on both my desktop and laptop, they are fairly # similar in other respects, and run mostly the same loads. Kenneth # Crudup reports that it seems to break both his vmware installation and # the KDE upower service. In both cases apparently leading to timeouts # due to waitinmg for the f_pos lock. # # There are a number of character devices in particular that definitely # want stream-like behavior, but that currently don't get marked as # streams, and as a result get the exclusion between concurrent # read()/write() on the same file descriptor. Which doesn't work well for # them. # # The most obvious example if this is /dev/console and /dev/tty, which use # console_fops and tty_fops respectively (and ptmx_fops for the pty master # side). It may be that it's just this that causes problems, but we # clearly weren't ready yet. # # Because there's a number of other likely common cases that don't have # llseek implementations and would seem to act as stream devices: # # /dev/fuse (fuse_dev_operations) # /dev/mcelog (mce_chrdev_ops) # /dev/mei0 (mei_fops) # /dev/net/tun (tun_fops) # /dev/nvme0 (nvme_dev_fops) # /dev/tpm0 (tpm_fops) # /proc/self/ns/mnt (ns_file_operations) # /dev/snd/pcm* (snd_pcm_f_ops[]) # # and while some of these could be trivially automatically detected by the # vfs layer when the character device is opened by just noticing that they # have no read or write operations either, it often isn't that obvious. # # Some character devices most definitely do use the file position, even if # they don't allow seeking: the firmware update code, for example, uses # simple_read_from_buffer() that does use f_pos, but doesn't allow seeking # back and forth. # # We'll revisit this when there's a better way to detect the problem and # fix it (possibly with a coccinelle script to do more of the FMODE_STREAM # annotations). # # Reported-by: Kenneth R. Crudup # Cc: Kirill Smelkov # Signed-off-by: Linus Torvalds # < /opt/cross/kisskb/gcc-4.6.3-nolibc/sh4-linux/bin/sh4-linux-gcc --version # < /opt/cross/kisskb/gcc-4.6.3-nolibc/sh4-linux/bin/sh4-linux-ld --version # < git log --format=%s --max-count=1 2be7d348fe924f0c5583c6a805bd42cecda93104 # < make -s -j 10 ARCH=sh O=/kisskb/build/linus_se7724_defconfig_sh4 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/sh4-linux/bin/sh4-linux- se7724_defconfig # make -s -j 10 ARCH=sh O=/kisskb/build/linus_se7724_defconfig_sh4 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/sh4-linux/bin/sh4-linux- Generating include/generated/machtypes.h :1511:2: warning: #warning syscall clone3 not implemented [-Wcpp] /kisskb/src/arch/sh/kernel/cpu/sh4/../sh3/../../entry-common.S: Assembler messages: /kisskb/src/arch/sh/kernel/cpu/sh4/../sh3/../../entry-common.S:385: Warning: overflow in branch to syscall_exit_work; converted into longer instruction sequence /kisskb/src/arch/sh/kernel/cpu/sh4/../sh3/../../entry-common.S:388: Warning: overflow in branch to syscall_exit_work; converted into longer instruction sequence /kisskb/src/drivers/base/regmap/regmap.c: In function 'regmap_raw_read': /kisskb/src/drivers/base/regmap/regmap.c:2591: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:1852:6: warning: 'ret' 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:204:16: warning: 'old' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/kernel/rcu/srcutree.c: In function 'init_srcu_struct_fields': /kisskb/src/kernel/rcu/srcutree.c:121:34: warning: 'levelspread[]' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/kernel/rcu/srcutree.c:88:6: note: 'levelspread[]' was declared here /kisskb/src/sound/soc/soc-pcm.c: In function 'dpcm_be_connect': /kisskb/src/sound/soc/soc-pcm.c:1149:8: warning: unused variable 'name' [-Wunused-variable] /kisskb/src/drivers/i2c/busses/i2c-sh_mobile.c: In function 'sh_mobile_i2c_isr': /kisskb/src/drivers/i2c/busses/i2c-sh_mobile.c:399:26: warning: 'data' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/i2c/busses/i2c-sh_mobile.c:372:16: note: 'data' was declared here /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:338:21: note: 'pdeo' was declared here /kisskb/src/drivers/sh/clk/cpg.c: In function 'r8': /kisskb/src/drivers/sh/clk/cpg.c:41:2: warning: passing argument 1 of 'ioread8' discards 'const' qualifier from pointer target type [enabled by default] /kisskb/src/include/asm-generic/iomap.h:29:21: note: expected 'void *' but argument is of type 'const void *' /kisskb/src/drivers/sh/clk/cpg.c: In function 'r16': /kisskb/src/drivers/sh/clk/cpg.c:46:2: warning: passing argument 1 of 'ioread16' discards 'const' qualifier from pointer target type [enabled by default] /kisskb/src/include/asm-generic/iomap.h:30:21: note: expected 'void *' but argument is of type 'const void *' /kisskb/src/drivers/sh/clk/cpg.c: In function 'r32': /kisskb/src/drivers/sh/clk/cpg.c:51:2: warning: passing argument 1 of 'ioread32' discards 'const' qualifier from pointer target type [enabled by default] /kisskb/src/include/asm-generic/iomap.h:32:21: note: expected 'void *' but argument is of type 'const void *' /kisskb/src/drivers/usb/core/devio.c: In function 'async_completed': /kisskb/src/drivers/usb/core/devio.c:625:23: warning: 'errno' may be used uninitialized in this function [-Wuninitialized] Image Name: Linux-5.4.0+ Created: Wed Nov 27 11:16:36 2019 Image Type: SuperH Linux Kernel Image (gzip compressed) Data Size: 3397835 Bytes = 3318.20 KiB = 3.24 MiB Load Address: 88001000 Entry Point: 88002000 Image arch/sh/boot/uImage is ready Completed OK # rm -rf /kisskb/build/linus_se7724_defconfig_sh4 # Build took: 0:00:51.406656