The MMC device tree bindings include properties used to signal various
signalling speed modes. Until now the sunxi driver was accepting them
without any further filtering, while the sunxi device trees were not
actually using them.
Since some of the H5 boards can not run at higher speed modes stably,
we are resorting to declaring the higher speed modes per-board.
Regardless, having boards declare modes and blindly following them,
even without proper support in the driver, is generally a bad thing.
Filter out all unsupported modes from the capabilities mask after
the device tree properties have been parsed.
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Chen-Yu Tsai <wens(a)csie.org>
---
This should be backported to stable kernels in case people try to run
new device trees (that declare newly supported modes) with old kernels.
---
drivers/mmc/host/sunxi-mmc.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
index 7415af8c8ff6..a01433012db0 100644
--- a/drivers/mmc/host/sunxi-mmc.c
+++ b/drivers/mmc/host/sunxi-mmc.c
@@ -1415,6 +1415,22 @@ static int sunxi_mmc_probe(struct platform_device *pdev)
if (ret)
goto error_free_dma;
+ /*
+ * If we don't support delay chains in the SoC, we can't use any
+ * of the DDR speed modes. Mask them out in case the device
+ * tree specifies the properties for them, which gets added to
+ * the caps by mmc_of_parse() above.
+ */
+ if (!(host->cfg->clk_delays || host->use_new_timings))
+ mmc->caps &= ~(MMC_CAP_3_3V_DDR | MMC_CAP_1_8V_DDR |
+ MMC_CAP_1_2V_DDR);
+
+ /* TODO: UHS modes untested due to lack of supporting boards */
+ mmc->caps &= ~MMC_CAP_UHS;
+
+ /* TODO: This driver doesn't support HS200 and HS400 modes yet */
+ mmc->caps2 &= ~(MMC_CAP2_HS200 | MMC_CAP2_HS400);
+
ret = sunxi_mmc_init_host(host);
if (ret)
goto error_free_dma;
--
2.20.1
tiocmget() and tiocmset() operations are optional so they are not
guaranteed to be set. Return ENODEV in ath_setup() if tty driver doesn't
support the operations.
Fixes: 4c876c0edbdc ("hci_uart: Add Atheros support for address config")
Cc: <stable(a)vger.kernel.org> # 4.1
Signed-off-by: Myungho Jung <mhjungk(a)gmail.com>
---
Changes in v2:
- Add NULL check and return error in ath_setup() instead of
ath_hci_uart_work()
Changes in v3:
- Fix to return -ENODEV
- Split into 2 patches
- Add stable CC and fixes tags
drivers/bluetooth/hci_ath.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/bluetooth/hci_ath.c b/drivers/bluetooth/hci_ath.c
index d568fbd94d6c..9f1ac1805d23 100644
--- a/drivers/bluetooth/hci_ath.c
+++ b/drivers/bluetooth/hci_ath.c
@@ -185,8 +185,14 @@ static int ath_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr)
static int ath_setup(struct hci_uart *hu)
{
+ struct tty_struct *tty = hu->tty;
+
BT_DBG("hu %p", hu);
+ /* tty driver should support operations to set RTS */
+ if (!tty->driver->ops->tiocmget || !tty->driver->ops->tiocmset)
+ return -ENODEV;
+
hu->hdev->set_bdaddr = ath_set_bdaddr;
return 0;
--
2.17.1
This is the start of the stable review cycle for the 4.19.20 release.
There are 74 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 Feb 6 10:35:34 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.20-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.20-rc1
Paulo Alcantara <paulo(a)paulo.ac>
cifs: Always resolve hostname before reconnecting
Alexei Naberezhnov <anaberezhnov(a)fb.com>
md/raid5: fix 'out of memory' during raid cache recovery
Frank Rowand <frank.rowand(a)sony.com>
of: overlay: do not duplicate properties from overlay for new nodes
Frank Rowand <frank.rowand(a)sony.com>
of: overlay: use prop add changeset entry for property in new nodes
Frank Rowand <frank.rowand(a)sony.com>
of: overlay: add missing of_node_get() in __of_attach_node_sysfs
Frank Rowand <frank.rowand(a)sony.com>
of: overlay: add tests to validate kfrees from overlay removal
Rob Herring <robh(a)kernel.org>
of: Convert to using %pOFn instead of device_node.name
David Hildenbrand <david(a)redhat.com>
mm: migrate: don't rely on __PageMovable() of newpage after unlocking it
Naoya Horiguchi <n-horiguchi(a)ah.jp.nec.com>
mm: hwpoison: use do_send_sig_info() instead of force_sig()
Shakeel Butt <shakeelb(a)google.com>
mm, oom: fix use-after-free in oom_kill_process
Oscar Salvador <osalvador(a)suse.de>
mm,memory_hotplug: fix scan_movable_pages() for gigantic hugepages
Tetsuo Handa <penguin-kernel(a)I-love.SAKURA.ne.jp>
oom, oom_reaper: do not enqueue same task twice
Andrea Arcangeli <aarcange(a)redhat.com>
mm/hugetlb.c: teach follow_hugetlb_page() to handle FOLL_NOWAIT
Andrei Vagin <avagin(a)gmail.com>
kernel/exit.c: release ptraced tasks before zap_pid_ns_processes
Eric W. Biederman <ebiederm(a)xmission.com>
btrfs: On error always free subvol_name in btrfs_mount
Filipe Manana <fdmanana(a)suse.com>
Btrfs: fix deadlock when allocating tree block during leaf/node split
Stefan Wahren <stefan.wahren(a)i2se.com>
mmc: sdhci-iproc: handle mmc_of_parse() errors during probe
João Paulo Rechi Vita <jprvita(a)gmail.com>
platform/x86: asus-nb-wmi: Drop mapping of 0x33 and 0x34 scan codes
João Paulo Rechi Vita <jprvita(a)gmail.com>
platform/x86: asus-nb-wmi: Map 0x35 to KEY_SCREENLOCK
Michael J. Ruhl <michael.j.ruhl(a)intel.com>
IB/hfi1: Remove overly conservative VM_EXEC flag check
Kailang Yang <kailang(a)realtek.com>
ALSA: hda/realtek - Fixed hp_pin no value
Olek Poplavsky <woodenbits(a)gmail.com>
ALSA: usb-audio: Add Opus #3 to quirks for native DSD support
Chaotian Jing <chaotian.jing(a)mediatek.com>
mmc: mediatek: fix incorrect register setting of hs400_cmd_int_delay
Lukas Wunner <lukas(a)wunner.de>
mmc: bcm2835: Fix DMA channel leak on probe error
Andreas Gruenbacher <agruenba(a)redhat.com>
gfs2: Revert "Fix loop in gfs2_rbm_find"
Neo Hou <neo.hou(a)unisoc.com>
gpio: sprd: Fix incorrect irq type setting for the async EIC
Neo Hou <neo.hou(a)unisoc.com>
gpio: sprd: Fix the incorrect data register
Roger Quadros <rogerq(a)ti.com>
gpio: pcf857x: Fix interrupts on multiple instances
Bartosz Golaszewski <bgolaszewski(a)baylibre.com>
gpiolib: fix line event timestamps for nested irqs
Axel Lin <axel.lin(a)ingics.com>
gpio: altera-a10sr: Set proper output level for direction_output
James Morse <james.morse(a)arm.com>
arm64: hibernate: Clean the __hyp_text to PoC after resume
James Morse <james.morse(a)arm.com>
arm64: hyp-stub: Forbid kprobing of the hyp-stub
Catalin Marinas <catalin.marinas(a)arm.com>
arm64: Do not issue IPIs for user executable ptes
Ard Biesheuvel <ard.biesheuvel(a)linaro.org>
arm64: kaslr: ensure randomized quantities are clean also when kaslr is off
Koen Vandeputte <koen.vandeputte(a)ncentric.com>
ARM: cns3xxx: Fix writing to wrong PCI config registers after alignment
Trond Myklebust <trondmy(a)gmail.com>
NFS: Fix up return value on fatal errors in nfs_page_async_flush()
Kees Cook <keescook(a)chromium.org>
selftests/seccomp: Enhance per-arch ptrace syscall skip tests
Gerald Schaefer <gerald.schaefer(a)de.ibm.com>
iommu/vt-d: Fix memory leak in intel_iommu_put_resv_regions()
Waiman Long <longman(a)redhat.com>
fs/dcache: Fix incorrect nr_dentry_unused accounting in shrink_dcache_sb()
Pavel Shilovsky <pshilov(a)microsoft.com>
CIFS: Do not consider -ENODATA as stat failure for reads
Pavel Shilovsky <pshilov(a)microsoft.com>
CIFS: Fix trace command logging for SMB2 reads and writes
Pavel Shilovsky <pshilov(a)microsoft.com>
CIFS: Do not count -ENODATA as failure for query directory
Toshiaki Makita <makita.toshiaki(a)lab.ntt.co.jp>
virtio_net: Differentiate sk_buff and xdp_frame on freeing
Toshiaki Makita <makita.toshiaki(a)lab.ntt.co.jp>
virtio_net: Use xdp_return_frame to free xdp_frames on destroying vqs
Toshiaki Makita <makita.toshiaki(a)lab.ntt.co.jp>
virtio_net: Don't process redirected XDP frames when XDP is disabled
Toshiaki Makita <makita.toshiaki(a)lab.ntt.co.jp>
virtio_net: Fix out of bounds access of sq
Toshiaki Makita <makita.toshiaki(a)lab.ntt.co.jp>
virtio_net: Fix not restoring real_num_rx_queues
Toshiaki Makita <makita.toshiaki(a)lab.ntt.co.jp>
virtio_net: Don't call free_old_xmit_skbs for xdp_frames
Toshiaki Makita <makita.toshiaki(a)lab.ntt.co.jp>
virtio_net: Don't enable NAPI when interface is down
Xin Long <lucien.xin(a)gmail.com>
sctp: set flow sport from saddr only when it's 0
Xin Long <lucien.xin(a)gmail.com>
sctp: set chunk transport correctly when it's a new asoc
Bodong Wang <bodong(a)mellanox.com>
Revert "net/mlx5e: E-Switch, Initialize eswitch only if eswitch manager"
Nir Dotan <nird(a)mellanox.com>
ip6mr: Fix notifiers call on mroute_clean_tables()
Aya Levin <ayal(a)mellanox.com>
net/mlx5e: Allow MAC invalidation while spoofchk is ON
Xin Long <lucien.xin(a)gmail.com>
sctp: improve the events for sctp stream adding
Lorenzo Bianconi <lorenzo.bianconi(a)redhat.com>
net: ip6_gre: always reports o_key to userspace
Jason Wang <jasowang(a)redhat.com>
vhost: fix OOB in get_rx_bufs()
Mathias Thore <mathias.thore(a)infinera.com>
ucc_geth: Reset BQL queue when stopping device
George Amanakis <gamanakis(a)gmail.com>
tun: move the call to tun_set_real_num_queues
Xin Long <lucien.xin(a)gmail.com>
sctp: improve the events for sctp stream reset
Simon Horman <horms+renesas(a)verge.net.au>
ravb: expand rx descriptor data to accommodate hw checksum
Josh Elsasser <jelsasser(a)appneta.com>
net: set default network namespace in init_dummy_netdev()
Bernard Pidoux <f6bvp(a)free.fr>
net/rose: fix NULL ax25_cb kernel panic
Cong Wang <xiyou.wangcong(a)gmail.com>
netrom: switch to sock timer API
Aya Levin <ayal(a)mellanox.com>
net/mlx4_core: Add masking for a few queries on HCA caps
Lorenzo Bianconi <lorenzo.bianconi(a)redhat.com>
net: ip_gre: use erspan key field for tunnel lookup
Lorenzo Bianconi <lorenzo.bianconi(a)redhat.com>
net: ip_gre: always reports o_key to userspace
Jacob Wen <jian.w.wen(a)oracle.com>
l2tp: fix reading optional fields of L2TPv3
Jacob Wen <jian.w.wen(a)oracle.com>
l2tp: copy 4 more bytes to linear part if necessary
Daniel Borkmann <daniel(a)iogearbox.net>
ipvlan, l3mdev: fix broken l3s mode wrt local routes
Yohei Kanemaru <yohei.kanemaru(a)gmail.com>
ipv6: sr: clear IP6CB(skb) on SRH ip4ip6 encapsulation
David Ahern <dsahern(a)gmail.com>
ipv6: Consider sk_bound_dev_if when binding a socket to an address
Arnd Bergmann <arnd(a)arndb.de>
drm/msm/gpu: fix building without debugfs
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Fix "net: ipv4: do not handle duplicate fragments as overlapping"
-------------
Diffstat:
Makefile | 4 +-
arch/arm/mach-cns3xxx/pcie.c | 2 +-
arch/arm64/kernel/hibernate.c | 4 +-
arch/arm64/kernel/hyp-stub.S | 2 +
arch/arm64/kernel/kaslr.c | 1 +
arch/arm64/mm/flush.c | 6 +-
drivers/gpio/gpio-altera-a10sr.c | 4 +-
drivers/gpio/gpio-eic-sprd.c | 14 +-
drivers/gpio/gpio-pcf857x.c | 26 ++--
drivers/gpio/gpiolib.c | 10 +-
drivers/gpu/drm/msm/msm_gpu.h | 2 +-
drivers/infiniband/hw/hfi1/file_ops.c | 2 +-
drivers/iommu/intel-iommu.c | 2 +-
drivers/md/raid5-cache.c | 33 +++--
drivers/md/raid5.c | 8 +-
drivers/mmc/host/bcm2835.c | 2 +
drivers/mmc/host/mtk-sd.c | 2 +-
drivers/mmc/host/sdhci-iproc.c | 5 +-
drivers/net/ethernet/freescale/ucc_geth.c | 2 +
drivers/net/ethernet/mellanox/mlx4/fw.c | 75 ++++++----
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 22 +--
drivers/net/ethernet/renesas/ravb_main.c | 12 +-
drivers/net/ipvlan/ipvlan_main.c | 6 +-
drivers/net/tun.c | 3 +-
drivers/net/virtio_net.c | 169 +++++++++++++++-------
drivers/of/device.c | 5 +-
drivers/of/dynamic.c | 32 +++-
drivers/of/kobj.c | 4 +-
drivers/of/of_mdio.c | 12 +-
drivers/of/of_numa.c | 4 +-
drivers/of/overlay.c | 117 ++++++++++-----
drivers/of/platform.c | 8 +-
drivers/of/unittest.c | 12 +-
drivers/platform/x86/asus-nb-wmi.c | 3 +-
drivers/vhost/net.c | 3 +-
drivers/vhost/scsi.c | 2 +-
drivers/vhost/vhost.c | 7 +-
drivers/vhost/vhost.h | 4 +-
drivers/vhost/vsock.c | 2 +-
fs/btrfs/ctree.c | 78 ++++++----
fs/btrfs/super.c | 3 +
fs/cifs/connect.c | 53 +++++++
fs/cifs/smb2pdu.c | 50 ++++---
fs/dcache.c | 6 +-
fs/gfs2/rgrp.c | 2 +-
fs/nfs/write.c | 9 +-
include/linux/netdevice.h | 8 +
include/linux/of.h | 15 +-
include/linux/sched/coredump.h | 1 +
include/net/l3mdev.h | 3 +-
kernel/exit.c | 12 +-
mm/hugetlb.c | 3 +-
mm/memory-failure.c | 3 +-
mm/memory_hotplug.c | 36 +++--
mm/migrate.c | 7 +-
mm/oom_kill.c | 12 +-
net/core/dev.c | 3 +
net/ipv4/gre_demux.c | 17 +++
net/ipv4/ip_fragment.c | 2 +-
net/ipv4/ip_gre.c | 16 +-
net/ipv6/af_inet6.c | 3 +
net/ipv6/ip6_gre.c | 11 +-
net/ipv6/ip6mr.c | 7 +-
net/ipv6/seg6_iptunnel.c | 2 +
net/l2tp/l2tp_core.c | 9 +-
net/l2tp/l2tp_core.h | 20 +++
net/l2tp/l2tp_ip.c | 3 +
net/l2tp/l2tp_ip6.c | 3 +
net/netrom/nr_timer.c | 20 +--
net/rose/rose_route.c | 5 +
net/sctp/ipv6.c | 3 +-
net/sctp/protocol.c | 3 +-
net/sctp/sm_make_chunk.c | 11 +-
net/sctp/stream.c | 58 ++++----
sound/pci/hda/patch_realtek.c | 78 +++++-----
sound/usb/quirks.c | 1 +
tools/testing/selftests/seccomp/seccomp_bpf.c | 72 +++++++--
77 files changed, 858 insertions(+), 423 deletions(-)
Presently when an error is encountered during probe of the cxlflash
adapter, a deadlock is seen with cpu thread stuck inside
cxlflash_remove(). Below is the trace of the deadlock as logged by
khungtaskd:
cxlflash 0006:00:00.0: cxlflash_probe: init_afu failed rc=-16
INFO: task kworker/80:1:890 blocked for more than 120 seconds.
Not tainted 5.0.0-rc4-capi2-kexec+ #2
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
kworker/80:1 D 0 890 2 0x00000808
Workqueue: events work_for_cpu_fn
Call Trace:
0x4d72136320 (unreliable)
__switch_to+0x2cc/0x460
__schedule+0x2bc/0xac0
schedule+0x40/0xb0
cxlflash_remove+0xec/0x640 [cxlflash]
cxlflash_probe+0x370/0x8f0 [cxlflash]
local_pci_probe+0x6c/0x140
work_for_cpu_fn+0x38/0x60
process_one_work+0x260/0x530
worker_thread+0x280/0x5d0
kthread+0x1a8/0x1b0
ret_from_kernel_thread+0x5c/0x80
INFO: task systemd-udevd:5160 blocked for more than 120 seconds.
The deadlock occurs as cxlflash_remove() is called from
cxlflash_probe() without setting 'cxlflash_cfg->state' to STATE_PROBED
and the probe thread starts to wait on
'cxlflash_cfg->reset_waitq'. Since the device was never successfully
probed the 'cxlflash_cfg->state' never changes from STATE_PROBING
hence the deadlock occurs.
We fix this deadlock by setting the variable 'cxlflash_cfg->state' to
STATE_PROBED in case an error occurs during cxlflash_probe() and just
before calling cxlflash_remove().
Cc: stable(a)vger.kernel.org
Fixes: c21e0bbfc485("cxlflash: Base support for IBM CXL Flash Adapter")
Signed-off-by: Vaibhav Jain <vaibhav(a)linux.ibm.com>
---
drivers/scsi/cxlflash/main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c
index bfa13e3b191c..c8bad2c093b8 100644
--- a/drivers/scsi/cxlflash/main.c
+++ b/drivers/scsi/cxlflash/main.c
@@ -3687,6 +3687,7 @@ static int cxlflash_probe(struct pci_dev *pdev,
host->max_cmd_len = CXLFLASH_MAX_CDB_LEN;
cfg = shost_priv(host);
+ cfg->state = STATE_PROBING;
cfg->host = host;
rc = alloc_mem(cfg);
if (rc) {
@@ -3775,6 +3776,7 @@ static int cxlflash_probe(struct pci_dev *pdev,
return rc;
out_remove:
+ cfg->state = STATE_PROBED;
cxlflash_remove(pdev);
goto out;
}
--
2.20.1
Since .scsi_done() must only be called after scsi_queue_rq() has
finished, make sure that the SRP initiator driver does not call
.scsi_done() while scsi_queue_rq() is in progress. Although
invoking sg_reset -d while I/O is in progress works fine with kernel
v4.20 and before, that is not the case with kernel v5.0-rc1. This
patch avoids that the following crash is triggered with kernel
v5.0-rc1:
BUG: unable to handle kernel NULL pointer dereference at 0000000000000138
CPU: 0 PID: 360 Comm: kworker/0:1H Tainted: G B 5.0.0-rc1-dbg+ #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014
Workqueue: kblockd blk_mq_run_work_fn
RIP: 0010:blk_mq_dispatch_rq_list+0x116/0xb10
Call Trace:
blk_mq_sched_dispatch_requests+0x2f7/0x300
__blk_mq_run_hw_queue+0xd6/0x180
blk_mq_run_work_fn+0x27/0x30
process_one_work+0x4f1/0xa20
worker_thread+0x67/0x5b0
kthread+0x1cf/0x1f0
ret_from_fork+0x24/0x30
Cc: Sergey Gorenko <sergeygo(a)mellanox.com>
Cc: Max Gurtovoy <maxg(a)mellanox.com>
Cc: Laurence Oberman <loberman(a)redhat.com>
Cc: <stable(a)vger.kernel.org>
Fixes: 94a9174c630c ("IB/srp: reduce lock coverage of command completion") # v2.6.38
Signed-off-by: Bart Van Assche <bvanassche(a)acm.org>
---
Changes compared to v1: left out the code that waits until in-progress requests
have finished.
drivers/infiniband/ulp/srp/ib_srp.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index af5197b5e7f1..085dba075651 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -3037,7 +3037,6 @@ static int srp_reset_device(struct scsi_cmnd *scmnd)
{
struct srp_target_port *target = host_to_target(scmnd->device->host);
struct srp_rdma_ch *ch;
- int i, j;
u8 status;
shost_printk(KERN_ERR, target->scsi_host, "SRP reset_device called\n");
@@ -3049,15 +3048,6 @@ static int srp_reset_device(struct scsi_cmnd *scmnd)
if (status)
return FAILED;
- for (i = 0; i < target->ch_count; i++) {
- ch = &target->ch[i];
- for (j = 0; j < target->req_ring_size; ++j) {
- struct srp_request *req = &ch->req_ring[j];
-
- srp_finish_req(ch, req, scmnd->device, DID_RESET << 16);
- }
- }
-
return SUCCESS;
}
--
2.20.1.495.gaa96b0ce6b-goog