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
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>
Miaoqian Lin [Fri, 14 Jan 2022 06:48:20 +0000 (06:48 +0000)]
gpio: mpc8xxx: Fix IRQ check in mpc8xxx_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:
76c47d1449fc ("gpio: mpc8xxx: Add ACPI support")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Christophe JAILLET [Sun, 26 Dec 2021 14:46:21 +0000 (15:46 +0100)]
irqchip/loongson-pch-ms: Use bitmap_free() to free bitmap
kfree() and bitmap_free() are the same. But using the latter is more
consistent when freeing memory allocated with bitmap_zalloc().
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/0b982ab54844803049c217b2899baa59602faacd.1640529916.git.christophe.jaillet@wanadoo.fr
Heiko Carstens [Mon, 17 Jan 2022 12:31:40 +0000 (13:31 +0100)]
s390: add Sven Schnelle as reviewer
Sven Schnelle will help reviewing s390 architecture code.
Acked-by: Sven Schnelle <svens@linux.ibm.com>
Acked-by: Alexander Gordeev <agordeev@linux.ibm.com>
Acked-by: Vasily Gorbik <gor@linux.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Nico Boehr [Tue, 11 Jan 2022 10:00:03 +0000 (11:00 +0100)]
s390/uaccess: introduce bit field for OAC specifier
Previously, we've used magic values to specify the OAC
(operand-access control) for mvcos.
Instead we introduce a bit field for it.
When using a bit field, we cannot use an immediate value with K
constraint anymore, since GCC older than 10 doesn't recognize
the bit field union as a compile time constant.
To make things work with older compilers,
load the OAC value through a register.
Bloat-o-meter reports a slight increase in kernel size with this change:
Total: Before=
15692135, After=
15693015, chg +0.01%
Signed-off-by: Nico Boehr <nrb@linux.ibm.com>
Co-developed-by: Janis Schoetterl-Glausch <scgl@linux.ibm.com>
Signed-off-by: Janis Schoetterl-Glausch <scgl@linux.ibm.com>
Link: https://lore.kernel.org/r/20220111100003.743116-1-scgl@linux.ibm.com
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Thomas Richter [Thu, 13 Jan 2022 11:51:56 +0000 (12:51 +0100)]
s390/cpumf: Support for CPU Measurement Sampling Facility LS bit
Adds support for the CPU Measurement Sampling Facility limit sampling
bit in the sampling device driver.
Limited samples have no valueable information are not collected.
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Acked-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Thomas Richter [Thu, 13 Jan 2022 11:31:16 +0000 (12:31 +0100)]
s390/cpumf: Support for CPU Measurement Facility CSVN 7
Adds support for the CPU Measurement Counter Facility second version
number 7.
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Acked-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
David S. Miller [Mon, 17 Jan 2022 13:07:47 +0000 (13:07 +0000)]
Merge branch 'skb-leak-fixes'
Gal Pressman says:
====================
net: Couple of skb memory leak fixes
As discussed in:
https://lore.kernel.org/netdev/
20220102081253.9123-1-gal@nvidia.com/
These are the two followup suggestions from Eric and Jakub.
Patch #1 adds a sk_defer_free_flush() call to the kTLS splice_read
handler.
Patch #2 verifies the defer list is empty on socket destroy, and calls a
defer free flush as well.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Gal Pressman [Mon, 17 Jan 2022 09:27:33 +0000 (11:27 +0200)]
net: Flush deferred skb free on socket destroy
The cited Fixes patch moved to a deferred skb approach where the skbs
are not freed immediately under the socket lock. Add a WARN_ON_ONCE()
to verify the deferred list is empty on socket destroy, and empty it to
prevent potential memory leaks.
Fixes:
f35f821935d8 ("tcp: defer skb freeing after socket lock is released")
Signed-off-by: Gal Pressman <gal@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Gal Pressman [Mon, 17 Jan 2022 09:27:32 +0000 (11:27 +0200)]
net/tls: Fix another skb memory leak when running kTLS traffic
This patch is a followup to
commit
ffef737fd037 ("net/tls: Fix skb memory leak when running kTLS traffic")
Which was missing another sk_defer_free_flush() call in
tls_sw_splice_read().
Fixes:
f35f821935d8 ("tcp: defer skb freeing after socket lock is released")
Signed-off-by: Gal Pressman <gal@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Horatiu Vultur [Mon, 17 Jan 2022 12:53:00 +0000 (13:53 +0100)]
net: ocelot: Fix the call to switchdev_bridge_port_offload
In the blamed commit, the call to the function
switchdev_bridge_port_offload was passing the wrong argument for
atomic_nb. It was ocelot_netdevice_nb instead of ocelot_swtchdev_nb.
This patch fixes this issue.
Fixes:
4e51bf44a03af6 ("net: bridge: move the switchdev object replay helpers to "push" mode")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sander Vanheule [Sun, 9 Jan 2022 14:54:34 +0000 (15:54 +0100)]
irqchip/realtek-rtl: Service all pending interrupts
Instead of only servicing the lowest pending interrupt line, make sure
all pending SoC interrupts are serviced before exiting the chained
handler. This adds a small overhead if only one interrupt is pending,
but should prevent rapid re-triggering of the handler.
Signed-off-by: Sander Vanheule <sander@svanheule.net>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/5082ad3cb8b4eedf55075561b93eff6570299fe1.1641739718.git.sander@svanheule.net
Sander Vanheule [Sun, 9 Jan 2022 14:54:33 +0000 (15:54 +0100)]
irqchip/realtek-rtl: Fix off-by-one in routing
There is an offset between routing values (1..6) and the connected MIPS
CPU interrupts (2..7), but no distinction was made between these two
values.
This issue was previously hidden during testing, because an interrupt
mapping was used where for each required interrupt another (unused)
routing was configured, with an offset of +1.
Offset the CPU IRQ numbers by -1 to retrieve the correct routing value.
Fixes:
9f3a0f34b84a ("irqchip: Add support for Realtek RTL838x/RTL839x interrupt controller")
Signed-off-by: Sander Vanheule <sander@svanheule.net>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/177b920aa8d8610615692d0e657e509f363c85ca.1641739718.git.sander@svanheule.net