From: Josef Bacik <josef(a)toxicpanda.com>
Qgroups will do the old roots lookup at delayed ref time, which could be
while walking down the extent root while running a delayed ref. This
should be fine, except we specifically lock eb's in the backref walking
code irrespective of path->skip_locking, which deadlocks the system.
Fix up the backref code to honor path->skip_locking, nobody will be
modifying the commit_root when we're searching so it's completely safe
to do.
This happens Since fb235dc06fac ("btrfs: qgroup: Move half of the qgroup
accounting time out of commit trans"), kernel may lockup with quota
enabled.
There is one backref trace triggered by snapshot dropping along with
write operation in the source subvolume. The example can be reliably
reproduced:
btrfs-cleaner D 0 4062 2 0x80000000
Call Trace:
schedule+0x32/0x90
btrfs_tree_read_lock+0x93/0x130 [btrfs]
find_parent_nodes+0x29b/0x1170 [btrfs]
btrfs_find_all_roots_safe+0xa8/0x120 [btrfs]
btrfs_find_all_roots+0x57/0x70 [btrfs]
btrfs_qgroup_trace_extent_post+0x37/0x70 [btrfs]
btrfs_qgroup_trace_leaf_items+0x10b/0x140 [btrfs]
btrfs_qgroup_trace_subtree+0xc8/0xe0 [btrfs]
do_walk_down+0x541/0x5e3 [btrfs]
walk_down_tree+0xab/0xe7 [btrfs]
btrfs_drop_snapshot+0x356/0x71a [btrfs]
btrfs_clean_one_deleted_snapshot+0xb8/0xf0 [btrfs]
cleaner_kthread+0x12b/0x160 [btrfs]
kthread+0x112/0x130
ret_from_fork+0x27/0x50
When dropping snapshots with qgroup enabled, we will trigger backref
walk.
However such backref walk at that timing is pretty dangerous, as if one
of the parent nodes get WRITE locked by other thread, we could cause a
dead lock.
For example:
FS 260 FS 261 (Dropped)
node A node B
/ \ / \
node C node D node E
/ \ / \ / \
leaf F|leaf G|leaf H|leaf I|leaf J|leaf K
The lock sequence would be:
Thread A (cleaner) | Thread B (other writer)
-----------------------------------------------------------------------
write_lock(B) |
write_lock(D) |
^^^ called by walk_down_tree() |
| write_lock(A)
| write_lock(D) << Stall
read_lock(H) << for backref walk |
read_lock(D) << lock owner is |
the same thread A |
so read lock is OK |
read_lock(A) << Stall |
So thread A hold write lock D, and needs read lock A to unlock.
While thread B holds write lock A, while needs lock D to unlock.
This will cause a deadlock.
This is not only limited to snapshot dropping case.
As the backref walk, even only happens on commit trees, is breaking the
normal top-down locking order, makes it deadlock prone.
Fixes: fb235dc06fac ("btrfs: qgroup: Move half of the qgroup accounting time out of commit trans")
CC: stable(a)vger.kernel.org # 4.19+
Reported-and-tested-by: David Sterba <dsterba(a)suse.com>
Reported-by: Filipe Manana <fdmanana(a)suse.com>
Reviewed-by: Qu Wenruo <wqu(a)suse.com>
Signed-off-by: Josef Bacik <josef(a)toxicpanda.com>
[ copy logs and deadlock analysis from Qu's patch ]
Signed-off-by: David Sterba <dsterba(a)suse.com>
---
fs/btrfs/backref.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index 78556447e1d5..973e8251b1bf 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -712,7 +712,7 @@ static int resolve_indirect_refs(struct btrfs_fs_info *fs_info,
* read tree blocks and add keys where required.
*/
static int add_missing_keys(struct btrfs_fs_info *fs_info,
- struct preftrees *preftrees)
+ struct preftrees *preftrees, bool lock)
{
struct prelim_ref *ref;
struct extent_buffer *eb;
@@ -737,12 +737,14 @@ static int add_missing_keys(struct btrfs_fs_info *fs_info,
free_extent_buffer(eb);
return -EIO;
}
- btrfs_tree_read_lock(eb);
+ if (lock)
+ btrfs_tree_read_lock(eb);
if (btrfs_header_level(eb) == 0)
btrfs_item_key_to_cpu(eb, &ref->key_for_search, 0);
else
btrfs_node_key_to_cpu(eb, &ref->key_for_search, 0);
- btrfs_tree_read_unlock(eb);
+ if (lock)
+ btrfs_tree_read_unlock(eb);
free_extent_buffer(eb);
prelim_ref_insert(fs_info, &preftrees->indirect, ref, NULL);
cond_resched();
@@ -1227,7 +1229,7 @@ static int find_parent_nodes(struct btrfs_trans_handle *trans,
btrfs_release_path(path);
- ret = add_missing_keys(fs_info, &preftrees);
+ ret = add_missing_keys(fs_info, &preftrees, path->skip_locking == 0);
if (ret)
goto out;
@@ -1288,11 +1290,13 @@ static int find_parent_nodes(struct btrfs_trans_handle *trans,
ret = -EIO;
goto out;
}
- btrfs_tree_read_lock(eb);
+ if (!path->skip_locking)
+ btrfs_tree_read_lock(eb);
btrfs_set_lock_blocking_rw(eb, BTRFS_READ_LOCK);
ret = find_extent_in_eb(eb, bytenr,
*extent_item_pos, &eie, ignore_offset);
- btrfs_tree_read_unlock_blocking(eb);
+ if (!path->skip_locking)
+ btrfs_tree_read_unlock_blocking(eb);
free_extent_buffer(eb);
if (ret < 0)
goto out;
--
2.20.1
This is the start of the stable review cycle for the 4.20.4 release.
There are 111 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Wed Jan 23 12:23:56 UTC 2019.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.20.4-rc1…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.20.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.20.4-rc1
Ivan Mironov <mironov.ivan(a)gmail.com>
drm/fb-helper: Ignore the value of fb_var_screeninfo.pixclock
Jaegeuk Kim <jaegeuk(a)kernel.org>
loop: drop caches if offset or block_size are changed
Tetsuo Handa <penguin-kernel(a)I-love.SAKURA.ne.jp>
loop: Fix double mutex_unlock(&loop_ctl_mutex) in loop_control_ioctl()
Jan Kara <jack(a)suse.cz>
loop: Get rid of 'nested' acquisition of loop_ctl_mutex
Jan Kara <jack(a)suse.cz>
loop: Avoid circular locking dependency between loop_ctl_mutex and bd_mutex
Jan Kara <jack(a)suse.cz>
loop: Fix deadlock when calling blkdev_reread_part()
Jan Kara <jack(a)suse.cz>
loop: Move loop_reread_partitions() out of loop_ctl_mutex
Jan Kara <jack(a)suse.cz>
loop: Move special partition reread handling in loop_clr_fd()
Jan Kara <jack(a)suse.cz>
loop: Push loop_ctl_mutex down to loop_change_fd()
Jan Kara <jack(a)suse.cz>
loop: Push loop_ctl_mutex down to loop_set_fd()
Jan Kara <jack(a)suse.cz>
loop: Push loop_ctl_mutex down to loop_set_status()
Jan Kara <jack(a)suse.cz>
loop: Push loop_ctl_mutex down to loop_get_status()
Jan Kara <jack(a)suse.cz>
loop: Push loop_ctl_mutex down into loop_clr_fd()
Jan Kara <jack(a)suse.cz>
loop: Split setting of lo_state from loop_clr_fd
Jan Kara <jack(a)suse.cz>
loop: Push lo_ctl_mutex down into individual ioctls
Jan Kara <jack(a)suse.cz>
loop: Get rid of loop_index_mutex
Jan Kara <jack(a)suse.cz>
loop: Fold __loop_release into loop_release
Tetsuo Handa <penguin-kernel(a)I-love.SAKURA.ne.jp>
block/loop: Use global lock for ioctl() operation.
Tetsuo Handa <penguin-kernel(a)I-love.SAKURA.ne.jp>
block/loop: Don't grab "struct file" for vfs_getattr() operation.
Ying Xue <ying.xue(a)windriver.com>
tipc: fix uninit-value in tipc_nl_compat_doit
Ying Xue <ying.xue(a)windriver.com>
tipc: fix uninit-value in tipc_nl_compat_name_table_dump
Ying Xue <ying.xue(a)windriver.com>
tipc: fix uninit-value in tipc_nl_compat_link_set
Ying Xue <ying.xue(a)windriver.com>
tipc: fix uninit-value in tipc_nl_compat_bearer_enable
Ying Xue <ying.xue(a)windriver.com>
tipc: fix uninit-value in tipc_nl_compat_link_reset_stats
Ying Xue <ying.xue(a)windriver.com>
tipc: fix uninit-value in in tipc_conn_rcv_sub
Xin Long <lucien.xin(a)gmail.com>
sctp: allocate sctp_sockaddr_entry with kzalloc
Jan Kara <jack(a)suse.cz>
blockdev: Fix livelocks on loop device
Stephen Smalley <sds(a)tycho.nsa.gov>
selinux: fix GPF on invalid policy
Tetsuo Handa <penguin-kernel(a)I-love.SAKURA.ne.jp>
gpu/drm: Fix lock held when returning to user space.
Daniel Vetter <daniel.vetter(a)ffwll.ch>
drm/vkms: Fix plane duplicate_state
Yufen Yu <yuyufen(a)huawei.com>
block: use rcu_work instead of call_rcu to avoid sleep in softirq
Shakeel Butt <shakeelb(a)google.com>
netfilter: ebtables: account ebt_table_info to kmemcg
J. Bruce Fields <bfields(a)redhat.com>
sunrpc: handle ENOMEM in rpcb_getport_async
Hans Verkuil <hverkuil(a)xs4all.nl>
media: vb2: vb2_mmap: move lock up
James Morris <james.morris(a)microsoft.com>
LSM: Check for NULL cred-security on free
Eric Dumazet <edumazet(a)google.com>
ipv6: make icmp6_send() robust against null skb->dev
Willem de Bruijn <willemb(a)google.com>
bpf: in __bpf_redirect_no_mac pull mac only if present
Hans Verkuil <hverkuil-cisco(a)xs4all.nl>
media: vivid: set min width/height to a value > 0
Hans Verkuil <hverkuil-cisco(a)xs4all.nl>
media: vivid: fix error handling of kthread_run
Vlad Tsyrklevich <vlad(a)tsyrklevich.net>
omap2fb: Fix stack memory disclosure
Florian La Roche <florian.laroche(a)googlemail.com>
fix int_sqrt64() for very large numbers
YunQiang Su <ysu(a)wavecomp.com>
Disable MSI also when pcie-octeon.pcie_disable on
Rob Herring <robh(a)kernel.org>
fbdev: offb: Fix OF node name handling
Heinrich Schuchardt <xypron.glpk(a)gmx.de>
arm64: dts: marvell: armada-ap806: reserve PSCI area
Ard Biesheuvel <ard.biesheuvel(a)linaro.org>
arm64: kaslr: ensure randomized quantities are clean to the PoC
Breno Leitao <leitao(a)debian.org>
powerpc/tm: Limit TM code inside PPC_TRANSACTIONAL_MEM
Trond Myklebust <trondmy(a)gmail.com>
SUNRPC: Fix TCP receive code on archs with flush_dcache_page()
Kees Cook <keescook(a)chromium.org>
pstore/ram: Avoid allocation and leak of platform data
Johan Hovold <johan(a)kernel.org>
net: dsa: realtek-smi: fix OF child-node lookup
Masahiro Yamada <yamada.masahiro(a)socionext.com>
kbuild: mark prepare0 as PHONY to fix external module build
Masahiro Yamada <yamada.masahiro(a)socionext.com>
kbuild: fix single target build for external module
Paul Burton <paul.burton(a)mips.com>
kbuild: Disable LD_DEAD_CODE_DATA_ELIMINATION with ftrace & GCC <= 4.7
Adit Ranadive <aditr(a)vmware.com>
RDMA/vmw_pvrdma: Return the correct opcode when creating WR
Leon Romanovsky <leon(a)kernel.org>
RDMA/nldev: Don't expose unsafe global rkey to regular user
Hans Verkuil <hverkuil(a)xs4all.nl>
media: vim2m: only cancel work if it is for right context
Sakari Ailus <sakari.ailus(a)linux.intel.com>
media: v4l: ioctl: Validate num_planes for debug messages
Jonathan Hunter <jonathanh(a)nvidia.com>
mfd: tps6586x: Handle interrupts on suspend
Julia Lawall <Julia.Lawall(a)lip6.fr>
OF: properties: add missing of_node_put
Julia Lawall <Julia.Lawall(a)lip6.fr>
drm/rockchip: add missing of_node_put
Zhenyu Wang <zhenyuw(a)linux.intel.com>
drm/i915/gvt: Fix mmap range check
Aurelien Jarno <aurelien(a)aurel32.net>
MIPS: OCTEON: fix kexec support
Hauke Mehrtens <hauke(a)hauke-m.de>
MIPS: lantiq: Fix IPI interrupt handling
Rafał Miłecki <rafal(a)milecki.pl>
MIPS: BCM47XX: Setup struct device for the SoC
Arnd Bergmann <arnd(a)arndb.de>
mips: fix n32 compat_ipc_parse_version
Wei Wang <wei.w.wang(a)intel.com>
virtio-balloon: tweak config_changed implementation
Wei Wang <wei.w.wang(a)intel.com>
virtio: don't allocate vqs when names[i] = NULL
Ivan Mironov <mironov.ivan(a)gmail.com>
scsi: sd: Fix cache_type_store()
Stanley Chu <stanley.chu(a)mediatek.com>
scsi: core: Synchronize request queue PM status only on successful resume
Kees Cook <keescook(a)chromium.org>
Yama: Check for pid death before checking ancestry
Josef Bacik <josef(a)toxicpanda.com>
btrfs: wait on ordered extents on abort cleanup
David Sterba <dsterba(a)suse.com>
Revert "btrfs: balance dirty metadata pages in btrfs_finish_ordered_io"
Juergen Gross <jgross(a)suse.com>
xen: Fix x86 sched_clock() interface for xen
Christophe Leroy <christophe.leroy(a)c-s.fr>
crypto: talitos - fix ablkcipher for CONFIG_VMAP_STACK
Christophe Leroy <christophe.leroy(a)c-s.fr>
crypto: talitos - reorder code in talitos_edesc_alloc()
Eric Biggers <ebiggers(a)google.com>
crypto: authenc - fix parsing key with misaligned rta_len
Eric Biggers <ebiggers(a)google.com>
crypto: bcm - convert to use crypto_authenc_extractkeys()
Eric Biggers <ebiggers(a)google.com>
crypto: ccree - convert to use crypto_authenc_extractkeys()
Harsh Jain <harsh(a)chelsio.com>
crypto: authencesn - Avoid twice completion call in decrypt path
Aymen Sghaier <aymen.sghaier(a)nxp.com>
crypto: caam - fix zero-length buffer DMA mapping
Eric Biggers <ebiggers(a)google.com>
crypto: sm3 - fix undefined shift by >= width of value
Cong Wang <xiyou.wangcong(a)gmail.com>
smc: move unhash as early as possible in smc_release()
Heiner Kallweit <hkallweit1(a)gmail.com>
r8169: don't try to read counters if chip is in a PCI power-save state
Willem de Bruijn <willemb(a)google.com>
ip: on queued skb use skb_header_pointer instead of pskb_may_pull
Willem de Bruijn <willemb(a)google.com>
bonding: update nest level on unlink
Heiner Kallweit <hkallweit1(a)gmail.com>
r8169: load Realtek PHY driver module before r8169
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
IN_BADCLASS: fix macro to actually work
Bryan Whitehead <Bryan.Whitehead(a)microchip.com>
lan743x: Remove phy_read from link status change function
Timotej Lazar <timotej.lazar(a)araneo.si>
net: phy: meson-gxl: Use the genphy_soft_reset callback
Andrew Lunn <andrew(a)lunn.ch>
net: phy: Add missing features to PHY drivers
Camelia Groza <camelia.groza(a)nxp.com>
net: phy: add missing phy driver features
Stanislav Fomichev <sdf(a)google.com>
tun: publish tfile after it's fully initialized
Yuchung Cheng <ycheng(a)google.com>
tcp: change txhash on SYN-data timeout
Jason Gunthorpe <jgg(a)ziepe.ca>
packet: Do not leak dev refcounts on error exit
JianJhen Chen <kchen(a)synology.com>
net: bridge: fix a bug on using a neighbour cache entry without checking its state
Eric Dumazet <edumazet(a)google.com>
ipv6: fix kernel-infoleak in ipv6_local_error()
Mark Rutland <mark.rutland(a)arm.com>
arm64: Don't trap host pointer auth use to EL2
Mark Rutland <mark.rutland(a)arm.com>
arm64/kvm: consistently handle host HCR_EL2 flags
Loic Poulain <loic.poulain(a)linaro.org>
mmc: sdhci-msm: Disable CDR function on TX
Florian Westphal <fw(a)strlen.de>
netfilter: nf_conncount: fix argument order to find_next_bit
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nf_conncount: speculative garbage collection on empty lists
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nf_conncount: move all list iterations under spinlock
Florian Westphal <fw(a)strlen.de>
netfilter: nf_conncount: merge lookup and add functions
Florian Westphal <fw(a)strlen.de>
netfilter: nf_conncount: restart search when nodes have been erased
Florian Westphal <fw(a)strlen.de>
netfilter: nf_conncount: split gc in two phases
Florian Westphal <fw(a)strlen.de>
netfilter: nf_conncount: don't skip eviction when age is negative
Shawn Bohrer <sbohrer(a)cloudflare.com>
netfilter: nf_conncount: replace CONNCOUNT_LOCK_SLOTS with CONNCOUNT_SLOTS
Oliver Hartkopp <socketcan(a)hartkopp.net>
can: gw: ensure DLC boundaries after CAN frame modification
Dmitry Safonov <dima(a)arista.com>
tty: Don't hold ldisc lock in tty_reopen() if ldisc present
Dmitry Safonov <dima(a)arista.com>
tty: Simplify tty->count math in tty_reopen()
Dmitry Safonov <dima(a)arista.com>
tty: Hold tty_ldisc_lock() during tty_reopen()
Dmitry Safonov <dima(a)arista.com>
tty/ldsem: Wake up readers after timed out down_write()
-------------
Diffstat:
Makefile | 19 +-
arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 17 +
arch/arm64/include/asm/kvm_arm.h | 3 +
arch/arm64/kernel/head.S | 5 +-
arch/arm64/kernel/kaslr.c | 8 +-
arch/arm64/kvm/hyp/switch.c | 2 +-
arch/mips/Kconfig | 1 +
arch/mips/bcm47xx/setup.c | 31 ++
arch/mips/cavium-octeon/setup.c | 2 +-
arch/mips/lantiq/irq.c | 68 +---
arch/mips/pci/msi-octeon.c | 4 +-
arch/powerpc/kernel/signal_64.c | 7 +-
arch/x86/xen/time.c | 12 +-
block/partition-generic.c | 8 +-
crypto/authenc.c | 14 +-
crypto/authencesn.c | 2 +-
crypto/sm3_generic.c | 2 +-
drivers/block/loop.c | 443 ++++++++++++++---------
drivers/block/loop.h | 1 -
drivers/crypto/Kconfig | 1 +
drivers/crypto/bcm/cipher.c | 44 +--
drivers/crypto/caam/caamhash.c | 15 +-
drivers/crypto/ccree/cc_aead.c | 40 +-
drivers/crypto/talitos.c | 26 +-
drivers/gpu/drm/drm_atomic_uapi.c | 3 +-
drivers/gpu/drm/drm_fb_helper.c | 7 +-
drivers/gpu/drm/drm_mode_object.c | 4 +-
drivers/gpu/drm/i915/gvt/kvmgt.c | 14 +-
drivers/gpu/drm/rockchip/rockchip_rgb.c | 4 +-
drivers/gpu/drm/vkms/vkms_plane.c | 7 +-
drivers/infiniband/core/nldev.c | 4 -
drivers/infiniband/hw/vmw_pvrdma/pvrdma.h | 35 +-
drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c | 6 +
drivers/media/common/videobuf2/videobuf2-core.c | 11 +-
drivers/media/platform/vim2m.c | 4 +-
drivers/media/platform/vivid/vivid-kthread-cap.c | 5 +-
drivers/media/platform/vivid/vivid-kthread-out.c | 5 +-
drivers/media/platform/vivid/vivid-vid-common.c | 2 +-
drivers/media/v4l2-core/v4l2-ioctl.c | 4 +-
drivers/mfd/tps6586x.c | 24 ++
drivers/misc/mic/vop/vop_main.c | 9 +-
drivers/mmc/host/sdhci-msm.c | 43 ++-
drivers/net/bonding/bond_main.c | 3 +
drivers/net/dsa/realtek-smi.c | 18 +-
drivers/net/ethernet/microchip/lan743x_main.c | 11 +-
drivers/net/ethernet/realtek/r8169.c | 7 +-
drivers/net/phy/bcm87xx.c | 2 +
drivers/net/phy/cortina.c | 1 +
drivers/net/phy/meson-gxl.c | 1 +
drivers/net/phy/micrel.c | 1 +
drivers/net/phy/phy_device.c | 12 +
drivers/net/phy/teranetics.c | 1 +
drivers/net/tun.c | 11 +-
drivers/of/property.c | 1 +
drivers/remoteproc/remoteproc_virtio.c | 9 +-
drivers/s390/virtio/virtio_ccw.c | 12 +-
drivers/scsi/scsi_pm.c | 26 +-
drivers/scsi/sd.c | 6 +
drivers/tty/tty_io.c | 22 +-
drivers/tty/tty_ldsem.c | 10 +
drivers/video/fbdev/offb.c | 18 +-
drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c | 2 +
drivers/virtio/virtio_balloon.c | 98 +++--
drivers/virtio/virtio_mmio.c | 9 +-
drivers/xen/events/events_base.c | 2 +-
fs/block_dev.c | 28 +-
fs/btrfs/disk-io.c | 8 +
fs/btrfs/inode.c | 3 -
fs/pstore/ram.c | 9 +-
include/linux/bcma/bcma_soc.h | 1 +
include/linux/genhd.h | 2 +-
include/linux/phy.h | 2 +
include/net/netfilter/nf_conntrack_count.h | 19 +-
include/uapi/linux/in.h | 2 +-
include/uapi/rdma/vmw_pvrdma-abi.h | 1 +
init/Kconfig | 1 +
lib/int_sqrt.c | 2 +-
net/bridge/br_netfilter_hooks.c | 2 +-
net/bridge/netfilter/ebtables.c | 6 +-
net/can/gw.c | 30 +-
net/core/filter.c | 21 +-
net/core/lwt_bpf.c | 1 +
net/ipv4/ip_sockglue.c | 12 +-
net/ipv4/tcp_timer.c | 2 +-
net/ipv6/datagram.c | 11 +-
net/ipv6/icmp.c | 8 +-
net/netfilter/nf_conncount.c | 290 +++++++--------
net/netfilter/nft_connlimit.c | 14 +-
net/packet/af_packet.c | 4 +-
net/sctp/ipv6.c | 5 +-
net/sctp/protocol.c | 4 +-
net/smc/af_smc.c | 4 +-
net/sunrpc/rpcb_clnt.c | 8 +
net/sunrpc/xprtsock.c | 22 ++
net/tipc/netlink_compat.c | 50 ++-
net/tipc/topsrv.c | 2 +-
security/security.c | 7 +
security/selinux/ss/policydb.c | 3 +-
security/yama/yama_lsm.c | 4 +-
99 files changed, 1118 insertions(+), 719 deletions(-)
Hi,
> On 22. Jan 2019, at 16:55, Sasha Levin <sashal(a)kernel.org> wrote:
>
> Hi,
>
> [This is an automated email]
>
> This commit has been processed because it contains a "Fixes:" tag,
> fixing commit: 35abb67de744 tracing: expose current->comm to [ku]probe events.
>
> The bot has tested the following trees: v4.20.3, v4.19.16, v4.14.94, v4.9.151.
>
> v4.20.3: Build OK!
> v4.19.16: Failed to apply! Possible dependencies:
> 40b53b771806 ("tracing: probeevent: Add array type support")
> 533059281ee5 ("tracing: probeevent: Introduce new argument fetching code")
> 56de76305279 ("tracing: probeevent: Cleanup print argument functions")
> 60c2e0cebfd0 ("tracing: probeevent: Add symbol type")
> eeb07b061500 ("tracing: probeevent: Cleanup argument field definition")
> f451bc89d835 ("tracing: probeevent: Unify fetch type tables")
>
> v4.14.94: Failed to apply! Possible dependencies:
> 40b53b771806 ("tracing: probeevent: Add array type support")
> 45408c4f9250 ("tracing: kprobes: Prohibit probing on notrace function")
> 4bebdc7a85aa ("bpf: add helper bpf_perf_prog_read_value")
> 533059281ee5 ("tracing: probeevent: Introduce new argument fetching code")
> 60c2e0cebfd0 ("tracing: probeevent: Add symbol type")
> 908432ca84fc ("bpf: add helper bpf_perf_event_read_value for perf event array map")
> 97562633bcba ("bpf: perf event change needed for subsequent bpf helpers")
> 9802d86585db ("bpf: add a bpf_override_function helper")
> b4da3340eae2 ("tracing/kprobe: bpf: Check error injectable event is on function entry")
> cd86d1fd2102 ("bpf: Adding helper function bpf_getsockops")
> dd0bb688eaa2 ("bpf: add a bpf_override_function helper")
> de8f3a83b0a0 ("bpf: add meta pointer for direct access")
> f3edacbd697f ("bpf: Revert bpf_overrid_function() helper changes.")
> f451bc89d835 ("tracing: probeevent: Unify fetch type tables")
>
> v4.9.151: Failed to apply! Possible dependencies:
> 17bedab27231 ("bpf: xdp: Allow head adjustment in XDP prog")
> 1d9995771fcb ("s390: update defconfigs")
> 23a4e389bdc7 ("nfp: create separate define for max number of vectors")
> 40b53b771806 ("tracing: probeevent: Add array type support")
> 45408c4f9250 ("tracing: kprobes: Prohibit probing on notrace function")
> 533059281ee5 ("tracing: probeevent: Introduce new argument fetching code")
> 60c2e0cebfd0 ("tracing: probeevent: Add symbol type")
> 67f8b1dcb9ee ("net/mlx4_en: Refactor the XDP forwarding rings scheme")
> 68453c7a8973 ("nfp: centralize runtime reconfiguration logic")
> 6b0b7551428e ("perf/core: Rename CONFIG_[UK]PROBE_EVENT to CONFIG_[UK]PROBE_EVENTS")
> 7ff5c83a1deb ("nfp: simplify nfp_net_poll()")
> 9802d86585db ("bpf: add a bpf_override_function helper")
> a4b562bb8ebd ("nfp: use unsigned int for vector/ring counts")
> b4da3340eae2 ("tracing/kprobe: bpf: Check error injectable event is on function entry")
> cbeaf7aa733a ("nfp: bring back support for different ring counts")
> ccc109b8ed24 ("net/mlx4_en: Add TX_XDP for CQ types")
> dd0bb688eaa2 ("bpf: add a bpf_override_function helper")
> e390b55d5aef ("bpf: make bpf_xdp_adjust_head support mandatory")
> ecd63a0217d5 ("nfp: add XDP support in the driver")
> f18f97ac43d7 ("tracing/kprobes: Add a helper method to return number of probe hits")
> f3edacbd697f ("bpf: Revert bpf_overrid_function() helper changes.")
> f451bc89d835 ("tracing: probeevent: Unify fetch type tables")
>
>
> How should we proceed with this patch?
I think this should be a case of backporting, which probably
needs
- removal of the 'parg->count ||' part from the if statement
(and the ', and not an array.' part of the comment above it).
- addition of the old 'ftbl' parameter to find_fetch_type()
for all kernels up to v4.19.16.
While at it, 'deferred' in the newly added comment should
probably be 'dereferenced' to match the deleted comment.
Masami, do you want to fix this up and prepare backported
patches for the stable kernels?
Thanks,
Andreas
This is the start of the stable review cycle for the 4.19.17 release.
There are 99 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Wed Jan 23 13:48:56 UTC 2019.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.17-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.19.17-rc1
Shuah Khan <shuah(a)kernel.org>
selftests: Fix test errors related to lib.mk khdr target
Ivan Mironov <mironov.ivan(a)gmail.com>
drm/fb-helper: Ignore the value of fb_var_screeninfo.pixclock
Jaegeuk Kim <jaegeuk(a)kernel.org>
loop: drop caches if offset or block_size are changed
Tetsuo Handa <penguin-kernel(a)I-love.SAKURA.ne.jp>
loop: Fix double mutex_unlock(&loop_ctl_mutex) in loop_control_ioctl()
Jan Kara <jack(a)suse.cz>
loop: Get rid of 'nested' acquisition of loop_ctl_mutex
Jan Kara <jack(a)suse.cz>
loop: Avoid circular locking dependency between loop_ctl_mutex and bd_mutex
Jan Kara <jack(a)suse.cz>
loop: Fix deadlock when calling blkdev_reread_part()
Jan Kara <jack(a)suse.cz>
loop: Move loop_reread_partitions() out of loop_ctl_mutex
Jan Kara <jack(a)suse.cz>
loop: Move special partition reread handling in loop_clr_fd()
Jan Kara <jack(a)suse.cz>
loop: Push loop_ctl_mutex down to loop_change_fd()
Jan Kara <jack(a)suse.cz>
loop: Push loop_ctl_mutex down to loop_set_fd()
Jan Kara <jack(a)suse.cz>
loop: Push loop_ctl_mutex down to loop_set_status()
Jan Kara <jack(a)suse.cz>
loop: Push loop_ctl_mutex down to loop_get_status()
Jan Kara <jack(a)suse.cz>
loop: Push loop_ctl_mutex down into loop_clr_fd()
Jan Kara <jack(a)suse.cz>
loop: Split setting of lo_state from loop_clr_fd
Jan Kara <jack(a)suse.cz>
loop: Push lo_ctl_mutex down into individual ioctls
Jan Kara <jack(a)suse.cz>
loop: Get rid of loop_index_mutex
Jan Kara <jack(a)suse.cz>
loop: Fold __loop_release into loop_release
Tetsuo Handa <penguin-kernel(a)I-love.SAKURA.ne.jp>
block/loop: Use global lock for ioctl() operation.
Tetsuo Handa <penguin-kernel(a)I-love.SAKURA.ne.jp>
block/loop: Don't grab "struct file" for vfs_getattr() operation.
Ying Xue <ying.xue(a)windriver.com>
tipc: fix uninit-value in tipc_nl_compat_doit
Ying Xue <ying.xue(a)windriver.com>
tipc: fix uninit-value in tipc_nl_compat_name_table_dump
Ying Xue <ying.xue(a)windriver.com>
tipc: fix uninit-value in tipc_nl_compat_link_set
Ying Xue <ying.xue(a)windriver.com>
tipc: fix uninit-value in tipc_nl_compat_bearer_enable
Ying Xue <ying.xue(a)windriver.com>
tipc: fix uninit-value in tipc_nl_compat_link_reset_stats
Ying Xue <ying.xue(a)windriver.com>
tipc: fix uninit-value in in tipc_conn_rcv_sub
Xin Long <lucien.xin(a)gmail.com>
sctp: allocate sctp_sockaddr_entry with kzalloc
Jan Kara <jack(a)suse.cz>
blockdev: Fix livelocks on loop device
Stephen Smalley <sds(a)tycho.nsa.gov>
selinux: fix GPF on invalid policy
Yufen Yu <yuyufen(a)huawei.com>
block: use rcu_work instead of call_rcu to avoid sleep in softirq
Shakeel Butt <shakeelb(a)google.com>
netfilter: ebtables: account ebt_table_info to kmemcg
J. Bruce Fields <bfields(a)redhat.com>
sunrpc: handle ENOMEM in rpcb_getport_async
Hans Verkuil <hverkuil(a)xs4all.nl>
media: vb2: vb2_mmap: move lock up
James Morris <james.morris(a)microsoft.com>
LSM: Check for NULL cred-security on free
Eric Dumazet <edumazet(a)google.com>
ipv6: make icmp6_send() robust against null skb->dev
Willem de Bruijn <willemb(a)google.com>
bpf: in __bpf_redirect_no_mac pull mac only if present
Hans Verkuil <hverkuil-cisco(a)xs4all.nl>
media: vivid: set min width/height to a value > 0
Hans Verkuil <hverkuil-cisco(a)xs4all.nl>
media: vivid: fix error handling of kthread_run
Vlad Tsyrklevich <vlad(a)tsyrklevich.net>
omap2fb: Fix stack memory disclosure
Florian La Roche <florian.laroche(a)googlemail.com>
fix int_sqrt64() for very large numbers
YunQiang Su <ysu(a)wavecomp.com>
Disable MSI also when pcie-octeon.pcie_disable on
Heinrich Schuchardt <xypron.glpk(a)gmx.de>
arm64: dts: marvell: armada-ap806: reserve PSCI area
Ard Biesheuvel <ard.biesheuvel(a)linaro.org>
arm64: kaslr: ensure randomized quantities are clean to the PoC
Kees Cook <keescook(a)chromium.org>
pstore/ram: Avoid allocation and leak of platform data
Johan Hovold <johan(a)kernel.org>
net: dsa: realtek-smi: fix OF child-node lookup
Paul Burton <paul.burton(a)mips.com>
kbuild: Disable LD_DEAD_CODE_DATA_ELIMINATION with ftrace & GCC <= 4.7
Adit Ranadive <aditr(a)vmware.com>
RDMA/vmw_pvrdma: Return the correct opcode when creating WR
Leon Romanovsky <leon(a)kernel.org>
RDMA/nldev: Don't expose unsafe global rkey to regular user
Sakari Ailus <sakari.ailus(a)linux.intel.com>
media: v4l: ioctl: Validate num_planes for debug messages
Jonathan Hunter <jonathanh(a)nvidia.com>
mfd: tps6586x: Handle interrupts on suspend
Julia Lawall <Julia.Lawall(a)lip6.fr>
OF: properties: add missing of_node_put
Zhenyu Wang <zhenyuw(a)linux.intel.com>
drm/i915/gvt: Fix mmap range check
Hauke Mehrtens <hauke(a)hauke-m.de>
MIPS: lantiq: Fix IPI interrupt handling
Rafał Miłecki <rafal(a)milecki.pl>
MIPS: BCM47XX: Setup struct device for the SoC
Arnd Bergmann <arnd(a)arndb.de>
mips: fix n32 compat_ipc_parse_version
Ivan Mironov <mironov.ivan(a)gmail.com>
scsi: sd: Fix cache_type_store()
Stanley Chu <stanley.chu(a)mediatek.com>
scsi: core: Synchronize request queue PM status only on successful resume
Kees Cook <keescook(a)chromium.org>
Yama: Check for pid death before checking ancestry
Josef Bacik <josef(a)toxicpanda.com>
btrfs: wait on ordered extents on abort cleanup
David Sterba <dsterba(a)suse.com>
Revert "btrfs: balance dirty metadata pages in btrfs_finish_ordered_io"
Juergen Gross <jgross(a)suse.com>
xen: Fix x86 sched_clock() interface for xen
Christophe Leroy <christophe.leroy(a)c-s.fr>
crypto: talitos - fix ablkcipher for CONFIG_VMAP_STACK
Christophe Leroy <christophe.leroy(a)c-s.fr>
crypto: talitos - reorder code in talitos_edesc_alloc()
Eric Biggers <ebiggers(a)google.com>
crypto: authenc - fix parsing key with misaligned rta_len
Eric Biggers <ebiggers(a)google.com>
crypto: bcm - convert to use crypto_authenc_extractkeys()
Eric Biggers <ebiggers(a)google.com>
crypto: ccree - convert to use crypto_authenc_extractkeys()
Harsh Jain <harsh(a)chelsio.com>
crypto: authencesn - Avoid twice completion call in decrypt path
Aymen Sghaier <aymen.sghaier(a)nxp.com>
crypto: caam - fix zero-length buffer DMA mapping
Eric Biggers <ebiggers(a)google.com>
crypto: sm3 - fix undefined shift by >= width of value
Heiner Kallweit <hkallweit1(a)gmail.com>
r8169: load Realtek PHY driver module before r8169
Willem de Bruijn <willemb(a)google.com>
ip: on queued skb use skb_header_pointer instead of pskb_may_pull
Willem de Bruijn <willemb(a)google.com>
bonding: update nest level on unlink
Heiner Kallweit <hkallweit1(a)gmail.com>
r8169: don't try to read counters if chip is in a PCI power-save state
Cong Wang <xiyou.wangcong(a)gmail.com>
smc: move unhash as early as possible in smc_release()
Bryan Whitehead <Bryan.Whitehead(a)microchip.com>
lan743x: Remove phy_read from link status change function
Stanislav Fomichev <sdf(a)google.com>
tun: publish tfile after it's fully initialized
Yuchung Cheng <ycheng(a)google.com>
tcp: change txhash on SYN-data timeout
Jason Gunthorpe <jgg(a)ziepe.ca>
packet: Do not leak dev refcounts on error exit
JianJhen Chen <kchen(a)synology.com>
net: bridge: fix a bug on using a neighbour cache entry without checking its state
Eric Dumazet <edumazet(a)google.com>
ipv6: fix kernel-infoleak in ipv6_local_error()
Mark Rutland <mark.rutland(a)arm.com>
arm64: Don't trap host pointer auth use to EL2
Mark Rutland <mark.rutland(a)arm.com>
arm64/kvm: consistently handle host HCR_EL2 flags
Varun Prakash <varun(a)chelsio.com>
scsi: target: iscsi: cxgbit: fix csk leak - 2
Varun Prakash <varun(a)chelsio.com>
scsi: target: iscsi: cxgbit: fix csk leak
Sasha Levin <sashal(a)kernel.org>
Revert "scsi: target: iscsi: cxgbit: fix csk leak"
Loic Poulain <loic.poulain(a)linaro.org>
mmc: sdhci-msm: Disable CDR function on TX
Florian Westphal <fw(a)strlen.de>
netfilter: nf_conncount: fix argument order to find_next_bit
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nf_conncount: speculative garbage collection on empty lists
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nf_conncount: move all list iterations under spinlock
Florian Westphal <fw(a)strlen.de>
netfilter: nf_conncount: merge lookup and add functions
Florian Westphal <fw(a)strlen.de>
netfilter: nf_conncount: restart search when nodes have been erased
Florian Westphal <fw(a)strlen.de>
netfilter: nf_conncount: split gc in two phases
Florian Westphal <fw(a)strlen.de>
netfilter: nf_conncount: don't skip eviction when age is negative
Shawn Bohrer <sbohrer(a)cloudflare.com>
netfilter: nf_conncount: replace CONNCOUNT_LOCK_SLOTS with CONNCOUNT_SLOTS
Oliver Hartkopp <socketcan(a)hartkopp.net>
can: gw: ensure DLC boundaries after CAN frame modification
Dmitry Safonov <dima(a)arista.com>
tty: Don't hold ldisc lock in tty_reopen() if ldisc present
Dmitry Safonov <dima(a)arista.com>
tty: Simplify tty->count math in tty_reopen()
Dmitry Safonov <dima(a)arista.com>
tty: Hold tty_ldisc_lock() during tty_reopen()
Dmitry Safonov <dima(a)arista.com>
tty/ldsem: Wake up readers after timed out down_write()
-------------
Diffstat:
Makefile | 4 +-
arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 17 +
arch/arm64/include/asm/kvm_arm.h | 3 +
arch/arm64/kernel/head.S | 5 +-
arch/arm64/kernel/kaslr.c | 8 +-
arch/arm64/kvm/hyp/switch.c | 2 +-
arch/mips/Kconfig | 1 +
arch/mips/bcm47xx/setup.c | 31 ++
arch/mips/lantiq/irq.c | 68 +---
arch/mips/pci/msi-octeon.c | 4 +-
arch/x86/xen/time.c | 12 +-
block/partition-generic.c | 8 +-
crypto/authenc.c | 14 +-
crypto/authencesn.c | 2 +-
crypto/sm3_generic.c | 2 +-
drivers/block/loop.c | 443 +++++++++++++--------
drivers/block/loop.h | 1 -
drivers/crypto/Kconfig | 1 +
drivers/crypto/bcm/cipher.c | 44 +-
drivers/crypto/caam/caamhash.c | 15 +-
drivers/crypto/ccree/cc_aead.c | 40 +-
drivers/crypto/talitos.c | 26 +-
drivers/gpu/drm/drm_fb_helper.c | 7 +-
drivers/gpu/drm/i915/gvt/kvmgt.c | 14 +-
drivers/infiniband/core/nldev.c | 4 -
drivers/infiniband/hw/vmw_pvrdma/pvrdma.h | 35 +-
drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c | 6 +
drivers/media/common/videobuf2/videobuf2-core.c | 11 +-
drivers/media/platform/vivid/vivid-kthread-cap.c | 5 +-
drivers/media/platform/vivid/vivid-kthread-out.c | 5 +-
drivers/media/platform/vivid/vivid-vid-common.c | 2 +-
drivers/media/v4l2-core/v4l2-ioctl.c | 4 +-
drivers/mfd/tps6586x.c | 24 ++
drivers/mmc/host/sdhci-msm.c | 43 +-
drivers/net/bonding/bond_main.c | 3 +
drivers/net/dsa/realtek-smi.c | 18 +-
drivers/net/ethernet/microchip/lan743x_main.c | 11 +-
drivers/net/ethernet/realtek/r8169.c | 7 +-
drivers/net/tun.c | 11 +-
drivers/of/property.c | 1 +
drivers/scsi/scsi_pm.c | 26 +-
drivers/scsi/sd.c | 6 +
drivers/target/iscsi/cxgbit/cxgbit_cm.c | 23 +-
drivers/tty/tty_io.c | 22 +-
drivers/tty/tty_ldsem.c | 10 +
drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c | 2 +
drivers/xen/events/events_base.c | 2 +-
fs/block_dev.c | 28 +-
fs/btrfs/disk-io.c | 8 +
fs/btrfs/inode.c | 3 -
fs/pstore/ram.c | 9 +-
include/linux/bcma/bcma_soc.h | 1 +
include/linux/genhd.h | 2 +-
include/net/netfilter/nf_conntrack_count.h | 19 +-
include/uapi/rdma/vmw_pvrdma-abi.h | 1 +
init/Kconfig | 1 +
lib/int_sqrt.c | 2 +-
net/bridge/br_netfilter_hooks.c | 2 +-
net/bridge/netfilter/ebtables.c | 6 +-
net/can/gw.c | 30 +-
net/core/filter.c | 21 +-
net/core/lwt_bpf.c | 1 +
net/ipv4/ip_sockglue.c | 12 +-
net/ipv4/tcp_timer.c | 2 +-
net/ipv6/datagram.c | 11 +-
net/ipv6/icmp.c | 8 +-
net/netfilter/nf_conncount.c | 290 ++++++--------
net/netfilter/nft_connlimit.c | 14 +-
net/packet/af_packet.c | 4 +-
net/sctp/ipv6.c | 5 +-
net/sctp/protocol.c | 4 +-
net/smc/af_smc.c | 4 +-
net/sunrpc/rpcb_clnt.c | 8 +
net/tipc/netlink_compat.c | 50 ++-
net/tipc/topsrv.c | 2 +-
security/security.c | 7 +
security/selinux/ss/policydb.c | 3 +-
security/yama/yama_lsm.c | 4 +-
tools/testing/selftests/android/Makefile | 2 +-
tools/testing/selftests/futex/functional/Makefile | 1 +
tools/testing/selftests/gpio/Makefile | 1 +
tools/testing/selftests/kvm/Makefile | 2 +-
tools/testing/selftests/lib.mk | 8 +-
.../selftests/networking/timestamping/Makefile | 1 +
tools/testing/selftests/vm/Makefile | 1 +
85 files changed, 977 insertions(+), 654 deletions(-)