From: Sasha Levin Date: Mon, 4 Nov 2019 16:02:15 +0000 (-0500) Subject: fixes for 5.3 X-Git-Tag: v4.4.199~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=86ba83ffce200b62737bca4b5cf83394ae2fc634;p=thirdparty%2Fkernel%2Fstable-queue.git fixes for 5.3 Signed-off-by: Sasha Levin --- diff --git a/queue-5.3/alsa-usb-audio-add-dsd-support-for-gustard-u16-x26-u.patch b/queue-5.3/alsa-usb-audio-add-dsd-support-for-gustard-u16-x26-u.patch new file mode 100644 index 00000000000..1deccf3ad39 --- /dev/null +++ b/queue-5.3/alsa-usb-audio-add-dsd-support-for-gustard-u16-x26-u.patch @@ -0,0 +1,36 @@ +From b19eca0a2e065a886b032975d56df0e8ab29f46c Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 24 Oct 2019 12:27:14 +0200 +Subject: ALSA: usb-audio: Add DSD support for Gustard U16/X26 USB Interface + +From: Justin Song + +[ Upstream commit e2995b95a914bbc6b5352be27d5d5f33ec802d2c ] + +This patch adds native DSD support for Gustard U16/X26 USB Interface. +Tested using VID and fp->dsd_raw method. + +Signed-off-by: Justin Song +Cc: +Link: https://lore.kernel.org/r/CA+9XP1ipsFn+r3bCBKRinQv-JrJ+EHOGBdZWZoMwxFv0R8Y1MQ@mail.gmail.com +Signed-off-by: Takashi Iwai +Signed-off-by: Sasha Levin +--- + sound/usb/quirks.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c +index 33d52ab6ebad0..059b70313f352 100644 +--- a/sound/usb/quirks.c ++++ b/sound/usb/quirks.c +@@ -1654,6 +1654,7 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip, + case 0x23ba: /* Playback Designs */ + case 0x25ce: /* Mytek devices */ + case 0x278b: /* Rotel? */ ++ case 0x292b: /* Gustard/Ess based devices */ + case 0x2ab6: /* T+A devices */ + case 0x3842: /* EVGA */ + case 0xc502: /* HiBy devices */ +-- +2.20.1 + diff --git a/queue-5.3/alsa-usb-audio-dsd-auto-detection-for-playback-desig.patch b/queue-5.3/alsa-usb-audio-dsd-auto-detection-for-playback-desig.patch new file mode 100644 index 00000000000..f35529e4a79 --- /dev/null +++ b/queue-5.3/alsa-usb-audio-dsd-auto-detection-for-playback-desig.patch @@ -0,0 +1,49 @@ +From 9e9733a84019b4652b6aeca06d2afe470e7f0402 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 28 Aug 2019 00:08:46 +0300 +Subject: ALSA: usb-audio: DSD auto-detection for Playback Designs + +From: Jussi Laako + +[ Upstream commit eb7505d52a2f8b0cfc3fd7146d8cb2dab5a73f0d ] + +Add DSD support auto-detection for newer Playback Designs devices. Older +device generations have a different USB interface implementation. + +Keep the auto-detection VID whitelist sorted. + +Signed-off-by: Jussi Laako +Signed-off-by: Takashi Iwai +Signed-off-by: Sasha Levin +--- + sound/usb/quirks.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c +index b6f7b13768a10..6f228b4ec8c3e 100644 +--- a/sound/usb/quirks.c ++++ b/sound/usb/quirks.c +@@ -1563,7 +1563,8 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip, + struct usb_interface *iface; + + /* Playback Designs */ +- if (USB_ID_VENDOR(chip->usb_id) == 0x23ba) { ++ if (USB_ID_VENDOR(chip->usb_id) == 0x23ba && ++ USB_ID_PRODUCT(chip->usb_id) < 0x0110) { + switch (fp->altsetting) { + case 1: + fp->dsd_dop = true; +@@ -1651,8 +1652,9 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip, + * from XMOS/Thesycon + */ + switch (USB_ID_VENDOR(chip->usb_id)) { +- case 0x20b1: /* XMOS based devices */ + case 0x152a: /* Thesycon devices */ ++ case 0x20b1: /* XMOS based devices */ ++ case 0x23ba: /* Playback Designs */ + case 0x25ce: /* Mytek devices */ + case 0x2ab6: /* T+A devices */ + case 0x3842: /* EVGA */ +-- +2.20.1 + diff --git a/queue-5.3/alsa-usb-audio-update-dsd-support-quirks-for-oppo-an.patch b/queue-5.3/alsa-usb-audio-update-dsd-support-quirks-for-oppo-an.patch new file mode 100644 index 00000000000..6cbd854720b --- /dev/null +++ b/queue-5.3/alsa-usb-audio-update-dsd-support-quirks-for-oppo-an.patch @@ -0,0 +1,59 @@ +From 0b50b053515193aaaebeeb36809efc85853ea510 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 28 Aug 2019 00:08:47 +0300 +Subject: ALSA: usb-audio: Update DSD support quirks for Oppo and Rotel + +From: Jussi Laako + +[ Upstream commit 0067e154b11e236d62a7a8205f321b097c21a35b ] + +Oppo has issued firmware updates that change alt setting used for DSD +support. However, these devices seem to support auto-detection, so +support is moved from explicit whitelisting to auto-detection. + +Also Rotel devices have USB interfaces that support DSD with +auto-detection. + +Signed-off-by: Jussi Laako +Signed-off-by: Takashi Iwai +Signed-off-by: Sasha Levin +--- + sound/usb/quirks.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c +index 6f228b4ec8c3e..33d52ab6ebad0 100644 +--- a/sound/usb/quirks.c ++++ b/sound/usb/quirks.c +@@ -1581,9 +1581,6 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip, + /* XMOS based USB DACs */ + switch (chip->usb_id) { + case USB_ID(0x1511, 0x0037): /* AURALiC VEGA */ +- case USB_ID(0x22d9, 0x0416): /* OPPO HA-1 */ +- case USB_ID(0x22d9, 0x0436): /* OPPO Sonica */ +- case USB_ID(0x22d9, 0x0461): /* OPPO UDP-205 */ + case USB_ID(0x2522, 0x0012): /* LH Labs VI DAC Infinity */ + case USB_ID(0x2772, 0x0230): /* Pro-Ject Pre Box S2 Digital */ + if (fp->altsetting == 2) +@@ -1597,7 +1594,6 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip, + case USB_ID(0x16d0, 0x0733): /* Furutech ADL Stratos */ + case USB_ID(0x16d0, 0x09db): /* NuPrime Audio DAC-9 */ + case USB_ID(0x1db5, 0x0003): /* Bryston BDA3 */ +- case USB_ID(0x22d9, 0x0426): /* OPPO HA-2 */ + case USB_ID(0x22e1, 0xca01): /* HDTA Serenade DSD */ + case USB_ID(0x249c, 0x9326): /* M2Tech Young MkIII */ + case USB_ID(0x2616, 0x0106): /* PS Audio NuWave DAC */ +@@ -1654,8 +1650,10 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip, + switch (USB_ID_VENDOR(chip->usb_id)) { + case 0x152a: /* Thesycon devices */ + case 0x20b1: /* XMOS based devices */ ++ case 0x22d9: /* Oppo */ + case 0x23ba: /* Playback Designs */ + case 0x25ce: /* Mytek devices */ ++ case 0x278b: /* Rotel? */ + case 0x2ab6: /* T+A devices */ + case 0x3842: /* EVGA */ + case 0xc502: /* HiBy devices */ +-- +2.20.1 + diff --git a/queue-5.3/blackhole_netdev-fix-syzkaller-reported-issue.patch b/queue-5.3/blackhole_netdev-fix-syzkaller-reported-issue.patch deleted file mode 100644 index ae9ce9d7e16..00000000000 --- a/queue-5.3/blackhole_netdev-fix-syzkaller-reported-issue.patch +++ /dev/null @@ -1,113 +0,0 @@ -From b0818f80c8c1bc215bba276bd61c216014fab23b Mon Sep 17 00:00:00 2001 -From: Mahesh Bandewar -Date: Fri, 11 Oct 2019 18:14:55 -0700 -Subject: blackhole_netdev: fix syzkaller reported issue - -From: Mahesh Bandewar - -commit b0818f80c8c1bc215bba276bd61c216014fab23b upstream. - -While invalidating the dst, we assign backhole_netdev instead of -loopback device. However, this device does not have idev pointer -and hence no ip6_ptr even if IPv6 is enabled. Possibly this has -triggered the syzbot reported crash. - -The syzbot report does not have reproducer, however, this is the -only device that doesn't have matching idev created. - -Crash instruction is : - -static inline bool ip6_ignore_linkdown(const struct net_device *dev) -{ - const struct inet6_dev *idev = __in6_dev_get(dev); - - return !!idev->cnf.ignore_routes_with_linkdown; <= crash -} - -Also ipv6 always assumes presence of idev and never checks for it -being NULL (as does the above referenced code). So adding a idev -for the blackhole_netdev to avoid this class of crashes in the future. - -Signed-off-by: David S. Miller -Signed-off-by: Greg Kroah-Hartman - ---- - net/ipv6/addrconf.c | 7 ++++++- - net/ipv6/route.c | 15 ++++++--------- - 2 files changed, 12 insertions(+), 10 deletions(-) - ---- a/net/ipv6/addrconf.c -+++ b/net/ipv6/addrconf.c -@@ -6996,7 +6996,7 @@ static struct rtnl_af_ops inet6_ops __re - - int __init addrconf_init(void) - { -- struct inet6_dev *idev; -+ struct inet6_dev *idev, *bdev; - int i, err; - - err = ipv6_addr_label_init(); -@@ -7036,10 +7036,14 @@ int __init addrconf_init(void) - */ - rtnl_lock(); - idev = ipv6_add_dev(init_net.loopback_dev); -+ bdev = ipv6_add_dev(blackhole_netdev); - rtnl_unlock(); - if (IS_ERR(idev)) { - err = PTR_ERR(idev); - goto errlo; -+ } else if (IS_ERR(bdev)) { -+ err = PTR_ERR(bdev); -+ goto errlo; - } - - ip6_route_init_special_entries(); -@@ -7124,6 +7128,7 @@ void addrconf_cleanup(void) - addrconf_ifdown(dev, 1); - } - addrconf_ifdown(init_net.loopback_dev, 2); -+ addrconf_ifdown(blackhole_netdev, 2); - - /* - * Check hash table. ---- a/net/ipv6/route.c -+++ b/net/ipv6/route.c -@@ -155,10 +155,9 @@ void rt6_uncached_list_del(struct rt6_in - - static void rt6_uncached_list_flush_dev(struct net *net, struct net_device *dev) - { -- struct net_device *loopback_dev = net->loopback_dev; - int cpu; - -- if (dev == loopback_dev) -+ if (dev == net->loopback_dev) - return; - - for_each_possible_cpu(cpu) { -@@ -171,7 +170,7 @@ static void rt6_uncached_list_flush_dev( - struct net_device *rt_dev = rt->dst.dev; - - if (rt_idev->dev == dev) { -- rt->rt6i_idev = in6_dev_get(loopback_dev); -+ rt->rt6i_idev = in6_dev_get(blackhole_netdev); - in6_dev_put(rt_idev); - } - -@@ -386,13 +385,11 @@ static void ip6_dst_ifdown(struct dst_en - { - struct rt6_info *rt = (struct rt6_info *)dst; - struct inet6_dev *idev = rt->rt6i_idev; -- struct net_device *loopback_dev = -- dev_net(dev)->loopback_dev; - -- if (idev && idev->dev != loopback_dev) { -- struct inet6_dev *loopback_idev = in6_dev_get(loopback_dev); -- if (loopback_idev) { -- rt->rt6i_idev = loopback_idev; -+ if (idev && idev->dev != dev_net(dev)->loopback_dev) { -+ struct inet6_dev *ibdev = in6_dev_get(blackhole_netdev); -+ if (ibdev) { -+ rt->rt6i_idev = ibdev; - in6_dev_put(idev); - } - } diff --git a/queue-5.3/rdma-mlx5-use-irq-xarray-locking-for-mkey_table.patch b/queue-5.3/rdma-mlx5-use-irq-xarray-locking-for-mkey_table.patch new file mode 100644 index 00000000000..4a3b8e0405b --- /dev/null +++ b/queue-5.3/rdma-mlx5-use-irq-xarray-locking-for-mkey_table.patch @@ -0,0 +1,93 @@ +From a0287eb8a8b1c6ffa40dd604ebb5ed16021d52f1 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 24 Oct 2019 23:49:13 +0000 +Subject: RDMA/mlx5: Use irq xarray locking for mkey_table + +From: Jason Gunthorpe + +[ Upstream commit 1524b12a6e02a85264af4ed208b034a2239ef374 ] + +The mkey_table xarray is touched by the reg_mr_callback() function which +is called from a hard irq. Thus all other uses of xa_lock must use the +_irq variants. + + WARNING: inconsistent lock state + 5.4.0-rc1 #12 Not tainted + -------------------------------- + inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage. + python3/343 [HC0[0]:SC0[0]:HE1:SE1] takes: + ffff888182be1d40 (&(&xa->xa_lock)->rlock#3){?.-.}, at: xa_erase+0x12/0x30 + {IN-HARDIRQ-W} state was registered at: + lock_acquire+0xe1/0x200 + _raw_spin_lock_irqsave+0x35/0x50 + reg_mr_callback+0x2dd/0x450 [mlx5_ib] + mlx5_cmd_exec_cb_handler+0x2c/0x70 [mlx5_core] + mlx5_cmd_comp_handler+0x355/0x840 [mlx5_core] + [..] + + Possible unsafe locking scenario: + + CPU0 + ---- + lock(&(&xa->xa_lock)->rlock#3); + + lock(&(&xa->xa_lock)->rlock#3); + + *** DEADLOCK *** + + 2 locks held by python3/343: + #0: ffff88818eb4bd38 (&uverbs_dev->disassociate_srcu){....}, at: ib_uverbs_ioctl+0xe5/0x1e0 [ib_uverbs] + #1: ffff888176c76d38 (&file->hw_destroy_rwsem){++++}, at: uobj_destroy+0x2d/0x90 [ib_uverbs] + + stack backtrace: + CPU: 3 PID: 343 Comm: python3 Not tainted 5.4.0-rc1 #12 + Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014 + Call Trace: + dump_stack+0x86/0xca + print_usage_bug.cold.50+0x2e5/0x355 + mark_lock+0x871/0xb50 + ? match_held_lock+0x20/0x250 + ? check_usage_forwards+0x240/0x240 + __lock_acquire+0x7de/0x23a0 + ? __kasan_check_read+0x11/0x20 + ? mark_lock+0xae/0xb50 + ? mark_held_locks+0xb0/0xb0 + ? find_held_lock+0xca/0xf0 + lock_acquire+0xe1/0x200 + ? xa_erase+0x12/0x30 + _raw_spin_lock+0x2a/0x40 + ? xa_erase+0x12/0x30 + xa_erase+0x12/0x30 + mlx5_ib_dealloc_mw+0x55/0xa0 [mlx5_ib] + uverbs_dealloc_mw+0x3c/0x70 [ib_uverbs] + uverbs_free_mw+0x1a/0x20 [ib_uverbs] + destroy_hw_idr_uobject+0x49/0xa0 [ib_uverbs] + [..] + +Fixes: 0417791536ae ("RDMA/mlx5: Add missing synchronize_srcu() for MW cases") +Link: https://lore.kernel.org/r/20191024234910.GA9038@ziepe.ca +Acked-by: Leon Romanovsky +Signed-off-by: Jason Gunthorpe +Signed-off-by: Sasha Levin +--- + drivers/infiniband/hw/mlx5/mr.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c +index c15d05f61cc7b..a6198fe7f3768 100644 +--- a/drivers/infiniband/hw/mlx5/mr.c ++++ b/drivers/infiniband/hw/mlx5/mr.c +@@ -1975,8 +1975,8 @@ int mlx5_ib_dealloc_mw(struct ib_mw *mw) + int err; + + if (IS_ENABLED(CONFIG_INFINIBAND_ON_DEMAND_PAGING)) { +- xa_erase(&dev->mdev->priv.mkey_table, +- mlx5_base_mkey(mmw->mmkey.key)); ++ xa_erase_irq(&dev->mdev->priv.mkey_table, ++ mlx5_base_mkey(mmw->mmkey.key)); + /* + * pagefault_single_data_segment() may be accessing mmw under + * SRCU if the user bound an ODP MR to this MW. +-- +2.20.1 + diff --git a/queue-5.3/sched-fair-fix-wunused-but-set-variable-warnings.patch b/queue-5.3/sched-fair-fix-wunused-but-set-variable-warnings.patch new file mode 100644 index 00000000000..188ab60239b --- /dev/null +++ b/queue-5.3/sched-fair-fix-wunused-but-set-variable-warnings.patch @@ -0,0 +1,90 @@ +From c8f9fcd2a516d452c04c96995084bcba9b489112 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 20 Aug 2019 14:40:55 -0400 +Subject: sched/fair: Fix -Wunused-but-set-variable warnings + +From: Qian Cai + +[ Upstream commit 763a9ec06c409dcde2a761aac4bb83ff3938e0b3 ] + +Commit: + + de53fd7aedb1 ("sched/fair: Fix low cpu usage with high throttling by removing expiration of cpu-local slices") + +introduced a few compilation warnings: + + kernel/sched/fair.c: In function '__refill_cfs_bandwidth_runtime': + kernel/sched/fair.c:4365:6: warning: variable 'now' set but not used [-Wunused-but-set-variable] + kernel/sched/fair.c: In function 'start_cfs_bandwidth': + kernel/sched/fair.c:4992:6: warning: variable 'overrun' set but not used [-Wunused-but-set-variable] + +Also, __refill_cfs_bandwidth_runtime() does no longer update the +expiration time, so fix the comments accordingly. + +Signed-off-by: Qian Cai +Signed-off-by: Peter Zijlstra (Intel) +Reviewed-by: Ben Segall +Reviewed-by: Dave Chiluk +Cc: Linus Torvalds +Cc: Peter Zijlstra +Cc: Thomas Gleixner +Cc: pauld@redhat.com +Fixes: de53fd7aedb1 ("sched/fair: Fix low cpu usage with high throttling by removing expiration of cpu-local slices") +Link: https://lkml.kernel.org/r/1566326455-8038-1-git-send-email-cai@lca.pw +Signed-off-by: Ingo Molnar +Signed-off-by: Sasha Levin +--- + kernel/sched/fair.c | 19 ++++++------------- + 1 file changed, 6 insertions(+), 13 deletions(-) + +diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c +index a11a9c2d7793e..649c6b60929e2 100644 +--- a/kernel/sched/fair.c ++++ b/kernel/sched/fair.c +@@ -4355,21 +4355,16 @@ static inline u64 sched_cfs_bandwidth_slice(void) + } + + /* +- * Replenish runtime according to assigned quota and update expiration time. +- * We use sched_clock_cpu directly instead of rq->clock to avoid adding +- * additional synchronization around rq->lock. ++ * Replenish runtime according to assigned quota. We use sched_clock_cpu ++ * directly instead of rq->clock to avoid adding additional synchronization ++ * around rq->lock. + * + * requires cfs_b->lock + */ + void __refill_cfs_bandwidth_runtime(struct cfs_bandwidth *cfs_b) + { +- u64 now; +- +- if (cfs_b->quota == RUNTIME_INF) +- return; +- +- now = sched_clock_cpu(smp_processor_id()); +- cfs_b->runtime = cfs_b->quota; ++ if (cfs_b->quota != RUNTIME_INF) ++ cfs_b->runtime = cfs_b->quota; + } + + static inline struct cfs_bandwidth *tg_cfs_bandwidth(struct task_group *tg) +@@ -4999,15 +4994,13 @@ static void init_cfs_rq_runtime(struct cfs_rq *cfs_rq) + + void start_cfs_bandwidth(struct cfs_bandwidth *cfs_b) + { +- u64 overrun; +- + lockdep_assert_held(&cfs_b->lock); + + if (cfs_b->period_active) + return; + + cfs_b->period_active = 1; +- overrun = hrtimer_forward_now(&cfs_b->period_timer, cfs_b->period); ++ hrtimer_forward_now(&cfs_b->period_timer, cfs_b->period); + hrtimer_start_expires(&cfs_b->period_timer, HRTIMER_MODE_ABS_PINNED); + } + +-- +2.20.1 + diff --git a/queue-5.3/series b/queue-5.3/series index ac778b267b0..75626a45e75 100644 --- a/queue-5.3/series +++ b/queue-5.3/series @@ -151,9 +151,13 @@ rxrpc-fix-trace-after-put-looking-at-the-put-peer-record.patch nfc-pn533-fix-use-after-free-and-memleaks.patch bonding-fix-potential-null-deref-in-bond_update_slave_arr.patch netfilter-conntrack-avoid-possible-false-sharing.patch -blackhole_netdev-fix-syzkaller-reported-issue.patch net-usb-sr9800-fix-uninitialized-local-variable.patch sch_netem-fix-rcu-splat-in-netem_enqueue.patch net-sched-sch_sfb-don-t-call-qdisc_put-while-holding-tree-lock.patch iwlwifi-exclude-geo-sar-support-for-3168.patch sched-fair-fix-low-cpu-usage-with-high-throttling-by-removing-expiration-of-cpu-local-slices.patch +alsa-usb-audio-dsd-auto-detection-for-playback-desig.patch +alsa-usb-audio-update-dsd-support-quirks-for-oppo-an.patch +alsa-usb-audio-add-dsd-support-for-gustard-u16-x26-u.patch +rdma-mlx5-use-irq-xarray-locking-for-mkey_table.patch +sched-fair-fix-wunused-but-set-variable-warnings.patch