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(-)
This is a note to let you know that I've just added the patch titled
tty: do not set TTY_IO_ERROR flag if console port
to my tty git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
in the tty-linus branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the
next -rc kernel release.
If you have any questions about this process, please let me know.
>From 2a48602615e0a2f563549c7d5c8d507f904cf96e Mon Sep 17 00:00:00 2001
From: Chanho Park <parkch98(a)gmail.com>
Date: Thu, 22 Nov 2018 18:23:47 +0900
Subject: tty: do not set TTY_IO_ERROR flag if console port
Since Commit 761ed4a94582 ('tty: serial_core: convert uart_close to use
tty_port_close') and Commit 4dda864d7307 ('tty: serial_core: Fix serial
console crash on port shutdown), a serial port which is used as
console can be stuck when logging out if there is a remained process.
After logged out, agetty will try to grab the serial port but it will
be failed because the previous process did not release the port
correctly. To fix this, TTY_IO_ERROR bit should not be enabled of
tty_port_close if the port is console port.
Reproduce step:
- Run background processes from serial console
$ while true; do sleep 10; done &
- Log out
$ logout
-> Stuck
- Read journal log by journalctl | tail
Jan 28 16:07:01 ubuntu systemd[1]: Stopped Serial Getty on ttyAMA0.
Jan 28 16:07:01 ubuntu systemd[1]: Started Serial Getty on ttyAMA0.
Jan 28 16:07:02 ubuntu agetty[1643]: /dev/ttyAMA0: not a tty
Fixes: 761ed4a94582 ("tty: serial_core: convert uart_close to use tty_port_close")
Cc: Geert Uytterhoeven <geert+renesas(a)glider.be>
Cc: Rob Herring <robh(a)kernel.org>
Cc: Jiri Slaby <jslaby(a)suse.com>
Signed-off-by: Chanho Park <parkch98(a)gmail.com>
Cc: stable <stable(a)vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/tty/tty_port.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c
index cb6075096a5b..044c3cbdcfa4 100644
--- a/drivers/tty/tty_port.c
+++ b/drivers/tty/tty_port.c
@@ -633,7 +633,8 @@ void tty_port_close(struct tty_port *port, struct tty_struct *tty,
if (tty_port_close_start(port, tty, filp) == 0)
return;
tty_port_shutdown(port, tty);
- set_bit(TTY_IO_ERROR, &tty->flags);
+ if (!port->console)
+ set_bit(TTY_IO_ERROR, &tty->flags);
tty_port_close_end(port, tty);
tty_port_tty_set(port, NULL);
}
--
2.19.2
imx274_read_reg() takes a u8 pointer ("reg") and casts it to pass it
to regmap_read(), which takes an unsigned int pointer. This results in
a corrupted stack and random crashes.
Fixes: 0985dd306f72 ("media: imx274: V4l2 driver for Sony imx274 CMOS sensor")
Cc: stable(a)vger.kernel.org # 4.15.x
Signed-off-by: Luca Ceresoli <luca(a)lucaceresoli.net>
---
Notes!
I have no evidence of this bug showing up in the mainline driver. It
appeared on a modified version where imx274_read_reg() is used,
unmodified, in a different way than it does in mainline (passing a
pointer to a single u8 instead of a pointer to an element of a u8
array).
Also the bug is only present in versions v4.15 (where the driver was
added) to v4.19. The offending function is unused since commit
ca017467c78b ("media: imx274: add helper to read multibyte
registers"), merged in v4.20-rc1, thus master is not affected. I'm
sending this bugfix patch anyway for easier integration in the stable
branches. Later I plan to send a patch against master to entirely
remove the function. Or somebody might want to use this function
again, so better having a fixed version out anyway.
I'm not 100% sure this qualifies this commit for stable trees.
---
drivers/media/i2c/imx274.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/media/i2c/imx274.c b/drivers/media/i2c/imx274.c
index e1b0395a657f..40c717f13eb8 100644
--- a/drivers/media/i2c/imx274.c
+++ b/drivers/media/i2c/imx274.c
@@ -619,16 +619,19 @@ static int imx274_write_table(struct stimx274 *priv, const struct reg_8 table[])
static inline int imx274_read_reg(struct stimx274 *priv, u16 addr, u8 *val)
{
+ unsigned int uint_val;
int err;
- err = regmap_read(priv->regmap, addr, (unsigned int *)val);
+ err = regmap_read(priv->regmap, addr, &uint_val);
if (err)
dev_err(&priv->client->dev,
"%s : i2c read failed, addr = %x\n", __func__, addr);
else
dev_dbg(&priv->client->dev,
"%s : addr 0x%x, val=0x%x\n", __func__,
- addr, *val);
+ addr, uint_val);
+
+ *val = uint_val;
return err;
}
--
2.17.1