Stephen Rothwell [Mon, 17 Jan 2022 22:58:17 +0000 (09:58 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/deller/linux-fbdev.git
Stephen Rothwell [Mon, 17 Jan 2022 22:56:31 +0000 (09:56 +1100)]
Merge branch 'imx-drm/next' of https://git.pengutronix.de/git/pza/linux
Stephen Rothwell [Mon, 17 Jan 2022 22:56:30 +0000 (09:56 +1100)]
Merge branch 'for-linux-next' of git://anongit.freedesktop.org/drm-intel
Stephen Rothwell [Mon, 17 Jan 2022 22:54:34 +0000 (09:54 +1100)]
Merge branch 'drm-next' of https://gitlab.freedesktop.org/agd5f/linux
Stephen Rothwell [Mon, 17 Jan 2022 22:52:56 +0000 (09:52 +1100)]
Merge branch 'master' of git://git./linux/kernel/git/bluetooth/bluetooth-next.git
Stephen Rothwell [Mon, 17 Jan 2022 22:51:39 +0000 (09:51 +1100)]
Merge branch 'cpupower' of git://git./linux/kernel/git/shuah/linux.git
Stephen Rothwell [Mon, 17 Jan 2022 22:38:00 +0000 (09:38 +1100)]
Merge branch 'linux-next' of git://git./linux/kernel/git/rafael/linux-pm.git
Stephen Rothwell [Mon, 17 Jan 2022 22:36:44 +0000 (09:36 +1100)]
Merge branch 'docs-next' of git://git.lwn.net/linux.git
Stephen Rothwell [Mon, 17 Jan 2022 22:36:43 +0000 (09:36 +1100)]
Merge branch 'i2c/for-next' of git://git./linux/kernel/git/wsa/linux.git
Stephen Rothwell [Mon, 17 Jan 2022 22:36:34 +0000 (09:36 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/hid/hid.git
Stephen Rothwell [Mon, 17 Jan 2022 22:36:34 +0000 (09:36 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/printk/linux.git
Stephen Rothwell [Mon, 17 Jan 2022 22:29:39 +0000 (09:29 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/viro/vfs.git
Stephen Rothwell [Mon, 17 Jan 2022 22:29:38 +0000 (09:29 +1100)]
Merge branch 'locks-next' of git://git./linux/kernel/git/jlayton/linux.git
Stephen Rothwell [Mon, 17 Jan 2022 22:29:35 +0000 (09:29 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/dlemoal/zonefs.git
Stephen Rothwell [Mon, 17 Jan 2022 22:29:34 +0000 (09:29 +1100)]
Merge branch 'for-next' of git://git./fs/xfs/xfs-linux.git
# Conflicts:
# fs/xfs/xfs_ioctl.c
Stephen Rothwell [Mon, 17 Jan 2022 22:22:13 +0000 (09:22 +1100)]
Merge branch 'overlayfs-next' of git://git./linux/kernel/git/mszeredi/vfs.git
Stephen Rothwell [Mon, 17 Jan 2022 22:22:12 +0000 (09:22 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/hubcap/linux
Stephen Rothwell [Mon, 17 Jan 2022 22:22:11 +0000 (09:22 +1100)]
Merge branch 'master' of https://github.com/Paragon-Software-Group/linux-ntfs3.git
Stephen Rothwell [Mon, 17 Jan 2022 22:22:09 +0000 (09:22 +1100)]
Merge branch 'linux-next' of git://git.linux-nfs.org/projects/anna/linux-nfs.git
Stephen Rothwell [Mon, 17 Jan 2022 22:22:08 +0000 (09:22 +1100)]
Merge branch 'ksmbd-for-next' of https://github.com/smfrench/smb3-kernel.git
Stephen Rothwell [Mon, 17 Jan 2022 22:22:07 +0000 (09:22 +1100)]
Merge branch 'dev' of git://git./linux/kernel/git/jaegeuk/f2fs.git
Stephen Rothwell [Mon, 17 Jan 2022 22:22:06 +0000 (09:22 +1100)]
Merge branch 'for_next' of git://git./linux/kernel/git/jack/linux-fs.git
Stephen Rothwell [Mon, 17 Jan 2022 22:22:05 +0000 (09:22 +1100)]
Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6.git
Stephen Rothwell [Mon, 17 Jan 2022 22:22:05 +0000 (09:22 +1100)]
Merge branch 'master' of git://github.com/ceph/ceph-client.git
# Conflicts:
# include/linux/ceph/libceph.h
# net/ceph/ceph_common.c
Stephen Rothwell [Mon, 17 Jan 2022 22:22:03 +0000 (09:22 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/kdave/linux.git
Stephen Rothwell [Mon, 17 Jan 2022 22:22:02 +0000 (09:22 +1100)]
Merge branch 'fscache-next' of git://git./linux/kernel/git/dhowells/linux-fs.git
Stephen Rothwell [Mon, 17 Jan 2022 22:22:01 +0000 (09:22 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/brauner/linux.git
Stephen Rothwell [Mon, 17 Jan 2022 22:19:35 +0000 (09:19 +1100)]
Merge branch 'xtensa-for-next' of git://github.com/jcmvbkbc/linux-xtensa.git
Stephen Rothwell [Mon, 17 Jan 2022 22:19:34 +0000 (09:19 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/s390/linux.git
Stephen Rothwell [Mon, 17 Jan 2022 22:19:34 +0000 (09:19 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/riscv/linux.git
# Conflicts:
# arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
# arch/riscv/include/asm/sbi.h
Stephen Rothwell [Mon, 17 Jan 2022 22:19:32 +0000 (09:19 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/deller/parisc-linux.git
Stephen Rothwell [Mon, 17 Jan 2022 22:19:31 +0000 (09:19 +1100)]
Merge branch 'next' of git://git./linux/kernel/git/greentime/linux.git
# Conflicts:
# arch/nds32/Kbuild
# arch/nds32/Kconfig
Stephen Rothwell [Mon, 17 Jan 2022 22:19:28 +0000 (09:19 +1100)]
Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze.git
Stephen Rothwell [Mon, 17 Jan 2022 22:19:20 +0000 (09:19 +1100)]
Merge branch 'h8300-next' of git://git.sourceforge.jp/gitroot/uclinux-h8/linux.git
Stephen Rothwell [Mon, 17 Jan 2022 22:19:19 +0000 (09:19 +1100)]
Merge branch 'clk-next' of git://git./linux/kernel/git/clk/linux.git
Stephen Rothwell [Mon, 17 Jan 2022 22:19:18 +0000 (09:19 +1100)]
Merge branch 'for-next' of git://github.com/Xilinx/linux-xlnx.git
Stephen Rothwell [Mon, 17 Jan 2022 22:19:16 +0000 (09:19 +1100)]
Merge branch 'ti-next' of git://git./linux/kernel/git/ti/linux.git
Stephen Rothwell [Mon, 17 Jan 2022 22:19:09 +0000 (09:19 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/tegra/linux.git
Stephen Rothwell [Mon, 17 Jan 2022 22:19:09 +0000 (09:19 +1100)]
Merge branch 'next' of https://git.linaro.org/people/jens.wiklander/linux-tee.git
Stephen Rothwell [Mon, 17 Jan 2022 22:19:06 +0000 (09:19 +1100)]
Merge branch 'sunxi/for-next' of git://git./linux/kernel/git/sunxi/linux.git
Stephen Rothwell [Mon, 17 Jan 2022 22:19:04 +0000 (09:19 +1100)]
Merge branch 'for-linux-next' of git://git./linux/kernel/git/sudeep.holla/linux.git
Stephen Rothwell [Mon, 17 Jan 2022 22:19:01 +0000 (09:19 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/krzk/linux.git
Stephen Rothwell [Mon, 17 Jan 2022 22:18:58 +0000 (09:18 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/mmind/linux-rockchip.git
Stephen Rothwell [Mon, 17 Jan 2022 22:18:55 +0000 (09:18 +1100)]
Merge branch 'next' of git://git./linux/kernel/git/geert/renesas-devel.git
Stephen Rothwell [Mon, 17 Jan 2022 22:18:54 +0000 (09:18 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/nsaenz/linux-rpi.git
Stephen Rothwell [Mon, 17 Jan 2022 22:18:53 +0000 (09:18 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/qcom/linux.git
# Conflicts:
# arch/arm/configs/multi_v7_defconfig
Stephen Rothwell [Mon, 17 Jan 2022 22:18:48 +0000 (09:18 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/tmlind/linux-omap.git
Stephen Rothwell [Mon, 17 Jan 2022 22:18:48 +0000 (09:18 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/gclement/mvebu.git
Stephen Rothwell [Mon, 17 Jan 2022 22:18:47 +0000 (09:18 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/matthias.bgg/linux.git
Stephen Rothwell [Mon, 17 Jan 2022 22:18:47 +0000 (09:18 +1100)]
Merge branch 'next' of git://git./linux/kernel/git/ssantosh/linux-keystone.git
Stephen Rothwell [Mon, 17 Jan 2022 22:18:41 +0000 (09:18 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/shawnguo/linux.git
Stephen Rothwell [Mon, 17 Jan 2022 22:18:38 +0000 (09:18 +1100)]
Merge branch 'for-next' of https://git./linux/kernel/git/krzk/linux-mem-ctrl.git
Stephen Rothwell [Mon, 17 Jan 2022 22:18:35 +0000 (09:18 +1100)]
Merge branch 'at91-next' of git://git./linux/kernel/git/at91/linux.git
Stephen Rothwell [Mon, 17 Jan 2022 22:18:34 +0000 (09:18 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/joel/bmc.git
Stephen Rothwell [Mon, 17 Jan 2022 22:18:33 +0000 (09:18 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/amlogic/linux.git
Stephen Rothwell [Mon, 17 Jan 2022 22:18:28 +0000 (09:18 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/mani/linux-actions.git
Stephen Rothwell [Mon, 17 Jan 2022 22:18:19 +0000 (09:18 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/soc/soc.git
Stephen Rothwell [Mon, 17 Jan 2022 22:18:18 +0000 (09:18 +1100)]
Merge branch 'for-next' of git://git.armlinux.org.uk/~rmk/linux-arm.git
Stephen Rothwell [Mon, 17 Jan 2022 22:17:04 +0000 (09:17 +1100)]
Merge branch 'perf/core' of git://git./linux/kernel/git/acme/linux.git
Stephen Rothwell [Mon, 17 Jan 2022 22:01:15 +0000 (09:01 +1100)]
Merge branch 'for-next' of git://git./linux/kernel/git/masahiroy/linux-kbuild.git
# Conflicts:
# scripts/link-vmlinux.sh
Huichun Feng [Tue, 11 Jan 2022 05:20:01 +0000 (13:20 +0800)]
docs: ftrace: fix ambiguous sentence
The sentence looks ambiguous, rephrase it by adding ", there".
Signed-off-by: Huichun Feng <foxhoundsk.tw@gmail.com>
Signed-off-by: Ching-Chun (Jim) Huang <jserv@ccns.ncku.edu.tw>
Signed-off-by: Chun-Hung Tseng <henrybear327@gmail.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Link: https://lore.kernel.org/r/20220111052000.2675944-1-foxhoundsk.tw@gmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Wang Cheng [Sat, 15 Jan 2022 12:52:36 +0000 (20:52 +0800)]
docs: staging/tee.rst: fix two typos found while reading
Signed-off-by: Wang Cheng <wanngchenng@gmail.com>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://lore.kernel.org/r/20220115125236.34886-1-wanngchenng@gmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Stephen Rothwell [Mon, 17 Jan 2022 21:54:24 +0000 (08:54 +1100)]
Merge branch 'irq/irqchip-fixes' of git://git./linux/kernel/git/maz/arm-platforms.git
Stephen Rothwell [Mon, 17 Jan 2022 21:54:23 +0000 (08:54 +1100)]
Merge branch 'fixes' of git://git./linux/kernel/git/rw/ubifs.git
Stephen Rothwell [Mon, 17 Jan 2022 21:54:22 +0000 (08:54 +1100)]
Merge branch 'gpio/for-current' of git://git./linux/kernel/git/brgl/linux.git
Stephen Rothwell [Mon, 17 Jan 2022 21:54:20 +0000 (08:54 +1100)]
Merge branch 'fix' of git://git./linux/kernel/git/leo/linux.git
Stephen Rothwell [Mon, 17 Jan 2022 21:54:15 +0000 (08:54 +1100)]
Merge branch 'rtc-fixes' of git://git./linux/kernel/git/abelloni/linux.git
Stephen Rothwell [Mon, 17 Jan 2022 21:54:14 +0000 (08:54 +1100)]
Merge branch 'next-fixes' of git://git./linux/kernel/git/kdave/linux.git
Stephen Rothwell [Mon, 17 Jan 2022 21:54:13 +0000 (08:54 +1100)]
Merge branch 'hwmon' of git://git./linux/kernel/git/groeck/linux-staging.git
Stephen Rothwell [Mon, 17 Jan 2022 21:54:11 +0000 (08:54 +1100)]
Merge branch 'fixes' of git://linuxtv.org/mchehab/media-next.git
Stephen Rothwell [Mon, 17 Jan 2022 21:54:09 +0000 (08:54 +1100)]
Merge branch 'fixes-togreg' of git://git./linux/kernel/git/jic23/iio.git
Stephen Rothwell [Mon, 17 Jan 2022 21:54:09 +0000 (08:54 +1100)]
Merge branch 'for-usb-fixes' of git://git./linux/kernel/git/peter.chen/usb.git
# Conflicts:
# drivers/usb/chipidea/ci_hdrc_imx.c
Stephen Rothwell [Mon, 17 Jan 2022 21:54:06 +0000 (08:54 +1100)]
Merge branch 'for-linus' of git://git./linux/kernel/git/broonie/spi.git
Stephen Rothwell [Mon, 17 Jan 2022 21:54:05 +0000 (08:54 +1100)]
Merge branch 'for-linus' of git://git./linux/kernel/git/broonie/regulator.git
Stephen Rothwell [Mon, 17 Jan 2022 21:54:03 +0000 (08:54 +1100)]
Merge branch 'for-linus' of git://git./linux/kernel/git/broonie/regmap.git
Stephen Rothwell [Mon, 17 Jan 2022 21:54:02 +0000 (08:54 +1100)]
Merge branch 'for-linus' of git://git./linux/kernel/git/broonie/sound.git
Stephen Rothwell [Mon, 17 Jan 2022 21:54:02 +0000 (08:54 +1100)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound.git
Stephen Rothwell [Mon, 17 Jan 2022 21:54:01 +0000 (08:54 +1100)]
Merge branch 'master' of git://git./linux/kernel/git/pablo/nf.git
Stephen Rothwell [Mon, 17 Jan 2022 21:54:00 +0000 (08:54 +1100)]
Merge branch 'master' of git://git./linux/kernel/git/bpf/bpf.git
Stephen Rothwell [Mon, 17 Jan 2022 21:53:59 +0000 (08:53 +1100)]
Merge branch 'master' of git://git./linux/kernel/git/netdev/net.git
Stephen Rothwell [Mon, 17 Jan 2022 21:53:58 +0000 (08:53 +1100)]
Merge branch 'fixes' of git://git./linux/kernel/git/powerpc/linux.git
Stephen Rothwell [Mon, 17 Jan 2022 21:53:57 +0000 (08:53 +1100)]
Merge branch 'fixes' of https://git./linux/kernel/git/krzk/linux-mem-ctrl.git
Stephen Rothwell [Mon, 17 Jan 2022 21:53:56 +0000 (08:53 +1100)]
Merge branch 'for-curr' of git://git./linux/kernel/git/vgupta/arc.git
YueHaibing [Thu, 9 Dec 2021 09:01:13 +0000 (17:01 +0800)]
video: fbdev: controlfb: Fix COMPILE_TEST build
If PPC_BOOK3S, PPC_PMAC and PPC32 is n, COMPILE_TEST build fails:
drivers/video/fbdev/controlfb.c:70:0: error: "pgprot_cached_wthru" redefined [-Werror]
#define pgprot_cached_wthru(prot) (prot)
In file included from ./arch/powerpc/include/asm/pgtable.h:20:0,
from ./include/linux/pgtable.h:6,
from ./include/linux/mm.h:33,
from drivers/video/fbdev/controlfb.c:37:
./arch/powerpc/include/asm/nohash/pgtable.h:243:0: note: this is the location of the previous definition
#define pgprot_cached_wthru(prot) (__pgprot((pgprot_val(prot) & ~_PAGE_CACHE_CTL) | \
Fixes:
a07a63b0e24d ("video: fbdev: controlfb: add COMPILE_TEST support")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Chunyang Zhong [Fri, 10 Dec 2021 10:28:16 +0000 (18:28 +0800)]
video: ocfb: add const to of_device_id
struct of_device_id should normally be const.
Signed-off-by: Chunyang Zhong <zhongchunyang@cdjrlc.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Luca Weiss [Mon, 13 Dec 2021 08:26:10 +0000 (09:26 +0100)]
dt-bindings: simple-framebuffer: allow standalone compatible
Qualcomm platforms use "simple-framebuffer" without a more specific
compatible. Allow that in the binding doc.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Helge Deller <deller@gmx.de>
Yang Guang [Sat, 18 Dec 2021 01:56:59 +0000 (09:56 +0800)]
video: fbdev: use swap() to make code cleaner
Use the macro 'swap()' defined in 'include/linux/minmax.h' to avoid
opencoding it.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: David Yang <davidcomponentone@gmail.com>
Signed-off-by: Yang Guang <yang.guang5@zte.com.cn>
Signed-off-by: Helge Deller <deller@gmx.de>
Z. Liu [Sat, 18 Dec 2021 18:00:35 +0000 (02:00 +0800)]
matroxfb: set maxvram of vbG200eW to the same as vbG200 to avoid black screen
Start from commit
11be60bd66d54 "matroxfb: add Matrox MGA-G200eW board
support", when maxvram is 0x800000, monitor become black w/ error message
said: "The current input timing is not supported by the monitor display.
Please change your input timing to 1920x1080@60Hz ...".
Fixes:
11be60bd66d5 ("matroxfb: add Matrox MGA-G200eW board support")
Signed-off-by: Z. Liu <liuzx@knownsec.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Eugene Korenevsky [Fri, 14 Jan 2022 19:53:40 +0000 (22:53 +0300)]
cifs: quirk for STATUS_OBJECT_NAME_INVALID returned for non-ASCII dfs refs
Windows SMB server responds with STATUS_OBJECT_NAME_INVALID code to
SMB2 QUERY_INFO request for "\<server>\<dfsname>\<linkpath>" DFS reference,
where <dfsname> contains non-ASCII unicode symbols.
Check such DFS reference and emulate -EREMOTE if it is actual.
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=215440
Signed-off-by: Eugene Korenevsky <ekorenevsky@astralinux.ru>
Signed-off-by: Steve French <stfrench@microsoft.com>
Eugene Korenevsky [Fri, 14 Jan 2022 19:53:00 +0000 (22:53 +0300)]
cifs: alloc_path_with_tree_prefix: do not append sep. if the path is empty
alloc_path_with_tree_prefix() concatenates tree prefix and the path.
Windows CIFS client does not add separator after the tree prefix if the path
is empty. Let's do the same.
This fixes mounting DFS namespaces with names containing non-ASCII symbols.
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=215440
Signed-off-by: Eugene Korenevsky <ekorenevsky@astralinux.ru>
Signed-off-by: Steve French <stfrench@microsoft.com>
Yang Li [Mon, 17 Jan 2022 01:11:30 +0000 (09:11 +0800)]
cifs: clean up an inconsistent indenting
Eliminate the follow smatch warning:
fs/cifs/sess.c:1581 sess_auth_rawntlmssp_authenticate() warn:
inconsistent indenting
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Shyam Prasad N [Mon, 17 Jan 2022 06:20:47 +0000 (00:20 -0600)]
cifs: free ntlmsspblob allocated in negotiate
One of my previous fixes:
cifs: send workstation name during ntlmssp session setup
...changed the prototype of build_ntlmssp_negotiate_blob
from being allocated by the caller to being allocated within
the function. The caller needs to free this object too.
While SMB2 version of the caller did it, I forgot to free
for the SMB1 version. Fixing that here.
Fixes:
49bd49f983b5 ("cifs: send workstation name during ntlmssp session setup")
Cc: stable@vger.kernel.org # 5.16
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
David Sterba [Mon, 17 Jan 2022 17:38:18 +0000 (18:38 +0100)]
Merge branch 'misc-5.17' into next-fixes
Filipe Manana [Mon, 17 Jan 2022 16:28:29 +0000 (16:28 +0000)]
btrfs: fix too long loop when defragging a 1 byte file
When attempting to defrag a file with a single byte, we can end up in a
too long loop, which is nearly infinite because at btrfs_defrag_file()
we end up with the variable last_byte assigned with a value of
18446744073709551615 (which is (u64)-1). The problem comes from the fact
we end up doing:
last_byte = round_up(last_byte, fs_info->sectorsize) - 1;
So if last_byte was assigned 0, which is i_size - 1, we underflow and
end up with the value
18446744073709551615.
This is trivial to reproduce and the following script triggers it:
$ cat test.sh
#!/bin/bash
DEV=/dev/sdj
MNT=/mnt/sdj
mkfs.btrfs -f $DEV
mount $DEV $MNT
echo -n "X" > $MNT/foobar
btrfs filesystem defragment $MNT/foobar
umount $MNT
So fix this by not decrementing last_byte by 1 before doing the sector
size round up. Also, to make it easier to follow, make the round up right
after computing last_byte.
Reported-by: Anthony Ruhier <aruhier@mailbox.org>
Fixes:
7b508037d4cac3 ("btrfs: defrag: use defrag_one_cluster() to implement btrfs_defrag_file()")
CC: stable@vger.kernel.org # 5.16+
Link: https://lore.kernel.org/linux-btrfs/0a269612-e43f-da22-c5bc-b34b1b56ebe8@mailbox.org/
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Qu Wenruo [Thu, 16 Dec 2021 11:47:35 +0000 (19:47 +0800)]
btrfs: don't start transaction for scrub if the fs is mounted read-only
[BUG]
The following super simple script would crash btrfs at unmount time, if
CONFIG_BTRFS_ASSERT() is set.
mkfs.btrfs -f $dev
mount $dev $mnt
xfs_io -f -c "pwrite 0 4k" $mnt/file
umount $mnt
mount -r ro $dev $mnt
btrfs scrub start -Br $mnt
umount $mnt
This will trigger the following ASSERT() introduced by commit
0a31daa4b602 ("btrfs: add assertion for empty list of transactions at
late stage of umount").
That patch is definitely not the cause, it just makes enough noise for
developers.
[CAUSE]
We will start transaction for the following call chain during scrub:
scrub_enumerate_chunks()
|- btrfs_inc_block_group_ro()
|- btrfs_join_transaction()
However for RO mount, there is no running transaction at all, thus
btrfs_join_transaction() will start a new transaction.
Furthermore, since it's read-only mount, btrfs_sync_fs() will not call
btrfs_commit_super() to commit the new but empty transaction.
And leads to the ASSERT().
The bug has been there for a long time. Only the new ASSERT() makes it
noisy enough to be noticed.
[FIX]
For read-only scrub on read-only mount, there is no need to start a
transaction nor to allocate new chunks in btrfs_inc_block_group_ro().
Just do extra read-only mount check in btrfs_inc_block_group_ro(), and
if it's read-only, skip all chunk allocation and go inc_block_group_ro()
directly.
CC: stable@vger.kernel.org # 5.4+
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Darrick J. Wong [Tue, 21 Dec 2021 21:07:38 +0000 (13:07 -0800)]
xfs: remove the XFS_IOC_{ALLOC,FREE}SP* definitions
Now that we've made these ioctls defunct, move them from xfs_fs.h to
xfs_ioctl.c, which effectively removes them from the publicly supported
ioctl interfaces for XFS.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Darrick J. Wong [Sat, 8 Jan 2022 01:45:51 +0000 (17:45 -0800)]
xfs: kill the XFS_IOC_{ALLOC,FREE}SP* ioctls
According to the glibc compat header for Irix 4, these ioctls originated
in April 1991 as a (somewhat clunky) way to preallocate space at the end
of a file on an EFS filesystem. XFS, which was released in Irix 5.3 in
December 1993, picked up these ioctls to maintain compatibility and they
were ported to Linux in the early 2000s.
Recently it was pointed out to me they still lurk in the kernel, even
though the Linux fallocate syscall supplanted the functionality a long
time ago. fstests doesn't seem to include any real functional or stress
tests for these ioctls, which means that the code quality is ... very
questionable. Most notably, it was a stale disk block exposure vector
for 21 years and nobody noticed or complained. As mature programmers
say, "If you're not testing it, it's broken."
Given all that, let's withdraw these ioctls from the XFS userspace API.
Normally we'd set a long deprecation process, but I estimate that there
aren't any real users, so let's trigger a warning in dmesg and return
-ENOTTY.
See: CVE-2021-4155
Augments:
983d8e60f508 ("xfs: map unwritten blocks in XFS_IOC_{ALLOC,FREE}SP just like fallocate")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Darrick J. Wong [Tue, 11 Jan 2022 22:05:02 +0000 (14:05 -0800)]
xfs: remove the XFS_IOC_FSSETDM definitions
Remove the definitions for these ioctls, since the functionality (and,
weirdly, the 32-bit compat ioctl definitions) were removed from the
kernel in November 2019.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Russell King (Oracle) [Mon, 17 Jan 2022 14:52:33 +0000 (14:52 +0000)]
net: sfp: fix high power modules without diagnostic monitoring
Commit
7cfa9c92d0a3 ("net: sfp: avoid power switch on address-change
modules") unintetionally changed the semantics for high power modules
without the digital diagnostics monitoring. We repeatedly attempt to
read the power status from the non-existing 0xa2 address in a futile
hope this failure is temporary:
[ 8.856051] sfp sfp-eth3: module NTT
0000000000000000 rev 0000 sn
0000000000000000 dc 160408
[ 8.865843] mvpp2
f4000000.ethernet eth3: switched to inband/1000base-x link mode
[ 8.873469] sfp sfp-eth3: Failed to read EEPROM: -5
[ 8.983251] sfp sfp-eth3: Failed to read EEPROM: -5
[ 9.103250] sfp sfp-eth3: Failed to read EEPROM: -5
We previosuly assumed such modules were powered up in the correct mode,
continuing without further configuration as long as the required power
class was supported by the host.
Restore this behaviour, while preserving the intent of subsequent
patches to avoid the "Address Change Sequence not supported" warning
if we are not going to be accessing the DDM address.
Fixes:
7cfa9c92d0a3 ("net: sfp: avoid power switch on address-change modules")
Reported-by: 照山周一郎 <teruyama@springboard-inc.jp>
Tested-by: 照山周一郎 <teruyama@springboard-inc.jp>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Miaoqian Lin [Fri, 14 Jan 2022 06:51:24 +0000 (06:51 +0000)]
gpio: idt3243x: Fix IRQ check in idt_gpio_probe
platform_get_irq() returns negative error number instead 0 on failure.
And the doc of platform_get_irq() provides a usage example:
int irq = platform_get_irq(pdev, 0);
if (irq < 0)
return irq;
Fix the check of return value to catch errors correctly.
Fixes:
4195926aedca ("gpio: Add support for IDT 79RC3243x GPIO controller")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>