The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 9844fb2e351311210e6660a9a1c62d17424a6145 Mon Sep 17 00:00:00 2001
From: Johan Hovold <johan(a)kernel.org>
Date: Mon, 27 Aug 2018 10:21:53 +0200
Subject: [PATCH] power: supply: twl4030-charger: fix OF sibling-node lookup
Use the new of_get_compatible_child() helper to lookup the usb sibling
node instead of using of_find_compatible_node(), which searches the
entire tree from a given start node and thus can return an unrelated
(non-sibling) node.
This also addresses a potential use-after-free (e.g. after probe
deferral) as the tree-wide helper drops a reference to its first
argument (i.e. the parent device node).
While at it, also fix the related phy-node reference leak.
Fixes: f5e4edb8c888 ("power: twl4030_charger: find associated phy by more reliable means.")
Cc: stable <stable(a)vger.kernel.org> # 4.2
Cc: NeilBrown <neilb(a)suse.de>
Cc: Felipe Balbi <felipe.balbi(a)linux.intel.com>
Cc: Sebastian Reichel <sre(a)kernel.org>
Reviewed-by: Sebastian Reichel <sre(a)kernel.org>
Signed-off-by: Johan Hovold <johan(a)kernel.org>
Signed-off-by: Rob Herring <robh(a)kernel.org>
diff --git a/drivers/power/supply/twl4030_charger.c b/drivers/power/supply/twl4030_charger.c
index bbcaee56db9d..b6a7d9f74cf3 100644
--- a/drivers/power/supply/twl4030_charger.c
+++ b/drivers/power/supply/twl4030_charger.c
@@ -996,12 +996,13 @@ static int twl4030_bci_probe(struct platform_device *pdev)
if (bci->dev->of_node) {
struct device_node *phynode;
- phynode = of_find_compatible_node(bci->dev->of_node->parent,
- NULL, "ti,twl4030-usb");
+ phynode = of_get_compatible_child(bci->dev->of_node->parent,
+ "ti,twl4030-usb");
if (phynode) {
bci->usb_nb.notifier_call = twl4030_bci_usb_ncb;
bci->transceiver = devm_usb_get_phy_by_node(
bci->dev, phynode, &bci->usb_nb);
+ of_node_put(phynode);
if (IS_ERR(bci->transceiver)) {
ret = PTR_ERR(bci->transceiver);
if (ret == -EPROBE_DEFER)
The patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 9844fb2e351311210e6660a9a1c62d17424a6145 Mon Sep 17 00:00:00 2001
From: Johan Hovold <johan(a)kernel.org>
Date: Mon, 27 Aug 2018 10:21:53 +0200
Subject: [PATCH] power: supply: twl4030-charger: fix OF sibling-node lookup
Use the new of_get_compatible_child() helper to lookup the usb sibling
node instead of using of_find_compatible_node(), which searches the
entire tree from a given start node and thus can return an unrelated
(non-sibling) node.
This also addresses a potential use-after-free (e.g. after probe
deferral) as the tree-wide helper drops a reference to its first
argument (i.e. the parent device node).
While at it, also fix the related phy-node reference leak.
Fixes: f5e4edb8c888 ("power: twl4030_charger: find associated phy by more reliable means.")
Cc: stable <stable(a)vger.kernel.org> # 4.2
Cc: NeilBrown <neilb(a)suse.de>
Cc: Felipe Balbi <felipe.balbi(a)linux.intel.com>
Cc: Sebastian Reichel <sre(a)kernel.org>
Reviewed-by: Sebastian Reichel <sre(a)kernel.org>
Signed-off-by: Johan Hovold <johan(a)kernel.org>
Signed-off-by: Rob Herring <robh(a)kernel.org>
diff --git a/drivers/power/supply/twl4030_charger.c b/drivers/power/supply/twl4030_charger.c
index bbcaee56db9d..b6a7d9f74cf3 100644
--- a/drivers/power/supply/twl4030_charger.c
+++ b/drivers/power/supply/twl4030_charger.c
@@ -996,12 +996,13 @@ static int twl4030_bci_probe(struct platform_device *pdev)
if (bci->dev->of_node) {
struct device_node *phynode;
- phynode = of_find_compatible_node(bci->dev->of_node->parent,
- NULL, "ti,twl4030-usb");
+ phynode = of_get_compatible_child(bci->dev->of_node->parent,
+ "ti,twl4030-usb");
if (phynode) {
bci->usb_nb.notifier_call = twl4030_bci_usb_ncb;
bci->transceiver = devm_usb_get_phy_by_node(
bci->dev, phynode, &bci->usb_nb);
+ of_node_put(phynode);
if (IS_ERR(bci->transceiver)) {
ret = PTR_ERR(bci->transceiver);
if (ret == -EPROBE_DEFER)
Fixes an error caused by 3-bit right rotation on offset address
calculation of MSI-X table in dw_pcie_ep_raise_msix_irq().
During the development time, by default the offset address of MSI-X
table was set to zero, so that even with a 3-bit right rotation the
computed result would still be zero and valid, therefore not being
noticed this bug.
Fixes: beb4641a787d ("PCI: dwc: Add MSI-X callbacks handler")
Signed-off-by: Gustavo Pimentel <gustavo.pimentel(a)synopsys.com>
Cc: stable(a)vger.kernel.org
---
drivers/pci/controller/dwc/pcie-designware-ep.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/controller/dwc/pcie-designware-ep.c
index 1e7b022..de8635a 100644
--- a/drivers/pci/controller/dwc/pcie-designware-ep.c
+++ b/drivers/pci/controller/dwc/pcie-designware-ep.c
@@ -440,7 +440,6 @@ int dw_pcie_ep_raise_msix_irq(struct dw_pcie_ep *ep, u8 func_no,
tbl_offset = dw_pcie_readl_dbi(pci, reg);
bir = (tbl_offset & PCI_MSIX_TABLE_BIR);
tbl_offset &= PCI_MSIX_TABLE_OFFSET;
- tbl_offset >>= 3;
reg = PCI_BASE_ADDRESS_0 + (4 * bir);
bar_addr_upper = 0;
--
2.7.4
On 11/27/18 8:43 AM, Sasha Levin wrote:
> Hi,
>
> [This is an automated email]
>
> This commit has been processed because it contains a -stable tag.
> The stable tag indicates that it's relevant for the following trees: v4.19,
> v4.14, v4.9, v4.4.
>
> The bot has tested the following trees: v4.19.4, v4.14.83, v4.9.140, v4.4.164,
> v3.18.126.
>
> v4.19.4: Build OK!
> v4.14.83: Failed to apply! Possible dependencies:
> afc9f65e01cd ("ARM: 8781/1: Fix Thumb-2 syscall return for binutils 2.29+")
>
> v4.9.140: Failed to apply! Possible dependencies:
> afc9f65e01cd ("ARM: 8781/1: Fix Thumb-2 syscall return for binutils 2.29+")
>
> v4.4.164: Failed to apply! Possible dependencies:
> 10573ae547c8 ("ARM: spectre-v1: fix syscall entry")
> afc9f65e01cd ("ARM: 8781/1: Fix Thumb-2 syscall return for binutils 2.29+")
>
>
> How should we proceed with this patch?
I'm sending a v2 for the same patch. Please hold.
Thank you!
This is the start of the stable review cycle for the 3.18.127 release.
There are 24 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 Nov 28 10:50:13 UTC 2018.
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/v3.x/stable-review/patch-3.18.127-r…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-3.18.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 3.18.127-rc1
Eric Biggers <ebiggers(a)google.com>
HID: uhid: forbid UHID_CREATE under KERNEL_DS or elevated privileges
Al Viro <viro(a)zeniv.linux.org.uk>
new helper: uaccess_kernel()
Hans de Goede <hdegoede(a)redhat.com>
ACPI / platform: Add SMB0001 HID to forbidden_id_list
Mattias Jacobsson <2pi(a)mok.nu>
USB: misc: appledisplay: add 20" Apple Cinema Display
Nathan Chancellor <natechancellor(a)gmail.com>
misc: atmel-ssc: Fix section annotation on atmel_ssc_get_driver_data
Emmanuel Pescosta <emmanuelpescosta099(a)gmail.com>
usb: quirks: Add delay-init quirk for Corsair K70 LUX RGB
Kai-Heng Feng <kai.heng.feng(a)canonical.com>
USB: quirks: Add no-lpm quirk for Raydium touchscreens
Maarten Jacobs <maarten256(a)outlook.com>
usb: cdc-acm: add entry for Hiro (Conexant) modem
Dan Carpenter <dan.carpenter(a)oracle.com>
uio: Fix an Oops on load
Sakari Ailus <sakari.ailus(a)linux.intel.com>
media: v4l: event: Add subscription to list before calling "add" operation
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Revert "Bluetooth: h5: Fix missing dependency on BT_HCIUART_SERDEV"
YueHaibing <yuehaibing(a)huawei.com>
SUNRPC: drop pointless static qualifier in xdr_get_next_encode_buffer()
Sasha Levin <sashal(a)kernel.org>
Revert "Revert "drm/i915: Fix mutex->owner inspection race under DEBUG_MUTEXES""
Minchan Kim <minchan(a)kernel.org>
zram: close udev startup race condition as default groups
Vignesh R <vigneshr(a)ti.com>
i2c: omap: Enable for ARCH_K3
Jeremy Linton <jeremy.linton(a)arm.com>
lib/raid6: Fix arm64 test build
Vasily Gorbik <gor(a)linux.ibm.com>
s390/vdso: add missing FORCE to build targets
Marek Szyprowski <m.szyprowski(a)samsung.com>
clk: samsung: exynos5420: Enable PERIS clocks for suspend
Chengguang Xu <cgxu519(a)gmx.com>
fs/exofs: fix potential memory leak in mount option parsing
Richard Weinberger <richard(a)nod.at>
um: Give start_idle_thread() a return code
Ernesto A. Fernández <ernesto.mnd.fernandez(a)gmail.com>
hfsplus: prevent btree data loss on root split
Ernesto A. Fernández <ernesto.mnd.fernandez(a)gmail.com>
hfs: prevent btree data loss on root split
Jann Horn <jannh(a)google.com>
reiserfs: propagate errors from fill_with_dentries() properly
Eric Dumazet <edumazet(a)google.com>
net-gro: reset skb->pkt_type in napi_reuse_skb()
-------------
Diffstat:
Makefile | 4 ++--
arch/s390/kernel/vdso32/Makefile | 6 ++---
arch/s390/kernel/vdso64/Makefile | 6 ++---
arch/um/os-Linux/skas/process.c | 5 +++++
drivers/acpi/acpi_platform.c | 1 +
drivers/block/zram/zram_drv.c | 18 +++++----------
drivers/bluetooth/Kconfig | 1 -
drivers/clk/samsung/clk-exynos5420.c | 1 +
drivers/gpu/drm/i915/i915_gem.c | 2 +-
drivers/hid/uhid.c | 13 +++++++++++
drivers/i2c/busses/Kconfig | 2 +-
drivers/media/v4l2-core/v4l2-event.c | 43 ++++++++++++++++++++----------------
drivers/misc/atmel-ssc.c | 2 +-
drivers/uio/uio.c | 7 ++++--
drivers/usb/class/cdc-acm.c | 3 +++
drivers/usb/core/quirks.c | 8 +++++++
drivers/usb/misc/appledisplay.c | 1 +
fs/exofs/super.c | 5 ++++-
fs/hfs/brec.c | 4 ++++
fs/hfsplus/brec.c | 4 ++++
fs/reiserfs/xattr.c | 7 ++++++
include/linux/uaccess.h | 3 +++
lib/raid6/test/Makefile | 4 ++--
net/core/dev.c | 4 ++++
net/sunrpc/xdr.c | 2 +-
25 files changed, 107 insertions(+), 49 deletions(-)