This is a note to let you know that I've just added the patch titled
igb: close/suspend race in netif_device_detach
to the 3.18-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
igb-close-suspend-race-in-netif_device_detach.patch
and it can be found in the queue-3.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 12:16:40 CET 2017
From: Todd Fujinaka <todd.fujinaka(a)intel.com>
Date: Tue, 15 Nov 2016 08:54:26 -0800
Subject: igb: close/suspend race in netif_device_detach
From: Todd Fujinaka <todd.fujinaka(a)intel.com>
[ Upstream commit 9474933caf21a4cb5147223dca1551f527aaac36 ]
Similar to ixgbe, when an interface is part of a namespace it is
possible that igb_close() may be called while __igb_shutdown() is
running which ends up in a double free WARN and/or a BUG in
free_msi_irqs().
Extend the rtnl_lock() to protect the call to netif_device_detach() and
igb_clear_interrupt_scheme() in __igb_shutdown() and check for
netif_device_present() to avoid calling igb_clear_interrupt_scheme() a
second time in igb_close().
Also extend the rtnl lock in igb_resume() to netif_device_attach().
Signed-off-by: Todd Fujinaka <todd.fujinaka(a)intel.com>
Acked-by: Alexander Duyck <alexander.h.duyck(a)intel.com>
Tested-by: Aaron Brown <aaron.f.brown(a)intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher(a)intel.com>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/net/ethernet/intel/igb/igb_main.c | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -3170,7 +3170,9 @@ static int __igb_close(struct net_device
static int igb_close(struct net_device *netdev)
{
- return __igb_close(netdev, false);
+ if (netif_device_present(netdev))
+ return __igb_close(netdev, false);
+ return 0;
}
/**
@@ -7328,12 +7330,14 @@ static int __igb_shutdown(struct pci_dev
int retval = 0;
#endif
+ rtnl_lock();
netif_device_detach(netdev);
if (netif_running(netdev))
__igb_close(netdev, true);
igb_clear_interrupt_scheme(adapter);
+ rtnl_unlock();
#ifdef CONFIG_PM
retval = pci_save_state(pdev);
@@ -7452,16 +7456,15 @@ static int igb_resume(struct device *dev
wr32(E1000_WUS, ~0);
- if (netdev->flags & IFF_UP) {
- rtnl_lock();
+ rtnl_lock();
+ if (!err && netif_running(netdev))
err = __igb_open(netdev, true);
- rtnl_unlock();
- if (err)
- return err;
- }
- netif_device_attach(netdev);
- return 0;
+ if (!err)
+ netif_device_attach(netdev);
+ rtnl_unlock();
+
+ return err;
}
#ifdef CONFIG_PM_RUNTIME
Patches currently in stable-queue which might be from todd.fujinaka(a)intel.com are
queue-3.18/igb-close-suspend-race-in-netif_device_detach.patch
This is a note to let you know that I've just added the patch titled
gpu: drm: mgag200: mgag200_main:- Handle error from pci_iomap
to the 3.18-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
gpu-drm-mgag200-mgag200_main-handle-error-from-pci_iomap.patch
and it can be found in the queue-3.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 12:16:40 CET 2017
From: Arvind Yadav <arvind.yadav.cs(a)gmail.com>
Date: Tue, 3 Jan 2017 17:00:27 +0530
Subject: gpu: drm: mgag200: mgag200_main:- Handle error from pci_iomap
From: Arvind Yadav <arvind.yadav.cs(a)gmail.com>
[ Upstream commit 4b0ea93f250afc6c1128e201b0a8a115ae613e47 ]
Here, pci_iomap can fail, handle this case and return -ENOMEM.
Signed-off-by: Arvind Yadav <arvind.yadav.cs(a)gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter(a)ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1483443027-13444-1-git-send-em…
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/gpu/drm/mgag200/mgag200_main.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/gpu/drm/mgag200/mgag200_main.c
+++ b/drivers/gpu/drm/mgag200/mgag200_main.c
@@ -138,6 +138,8 @@ static int mga_vram_init(struct mga_devi
}
mem = pci_iomap(mdev->dev->pdev, 0, 0);
+ if (!mem)
+ return -ENOMEM;
mdev->mc.vram_size = mga_probe_vram(mdev, mem);
Patches currently in stable-queue which might be from arvind.yadav.cs(a)gmail.com are
queue-3.18/gpu-drm-mgag200-mgag200_main-handle-error-from-pci_iomap.patch
queue-3.18/media-imon-fix-null-ptr-deref-in-imon_probe.patch
queue-3.18/drm-sti-sti_vtg-handle-return-null-error-from-devm_ioremap_nocache.patch
This is a note to let you know that I've just added the patch titled
extcon: palmas: Check the parent instance to prevent the NULL
to the 3.18-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
extcon-palmas-check-the-parent-instance-to-prevent-the-null.patch
and it can be found in the queue-3.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 12:16:40 CET 2017
From: Roger Quadros <rogerq(a)ti.com>
Date: Thu, 8 Dec 2016 10:45:31 +0200
Subject: extcon: palmas: Check the parent instance to prevent the NULL
From: Roger Quadros <rogerq(a)ti.com>
[ Upstream commit 9fe172b9be532acc23e35ba693700383ab775e66 ]
extcon-palmas must be child of palmas and expects parent's
drvdata to be valid. Check for non NULL parent drvdata and
fail if it is NULL. Not doing so will result in a NULL
pointer dereference later in the probe() parent drvdata
is NULL (e.g. misplaced extcon-palmas node in device tree).
Signed-off-by: Roger Quadros <rogerq(a)ti.com>
Signed-off-by: Chanwoo Choi <cw00.choi(a)samsung.com>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/extcon/extcon-palmas.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/drivers/extcon/extcon-palmas.c
+++ b/drivers/extcon/extcon-palmas.c
@@ -150,6 +150,11 @@ static int palmas_usb_probe(struct platf
struct palmas_usb *palmas_usb;
int status;
+ if (!palmas) {
+ dev_err(&pdev->dev, "failed to get valid parent\n");
+ return -EINVAL;
+ }
+
palmas_usb = devm_kzalloc(&pdev->dev, sizeof(*palmas_usb), GFP_KERNEL);
if (!palmas_usb)
return -ENOMEM;
Patches currently in stable-queue which might be from rogerq(a)ti.com are
queue-3.18/extcon-palmas-check-the-parent-instance-to-prevent-the-null.patch
This is a note to let you know that I've just added the patch titled
drm/sti: sti_vtg: Handle return NULL error from devm_ioremap_nocache
to the 3.18-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
drm-sti-sti_vtg-handle-return-null-error-from-devm_ioremap_nocache.patch
and it can be found in the queue-3.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 12:16:40 CET 2017
From: Arvind Yadav <arvind.yadav.cs(a)gmail.com>
Date: Wed, 21 Dec 2016 11:00:12 +0530
Subject: drm/sti: sti_vtg: Handle return NULL error from devm_ioremap_nocache
From: Arvind Yadav <arvind.yadav.cs(a)gmail.com>
[ Upstream commit 1ae0d5af347df224a6e76334683f13a96d915a44 ]
Here, If devm_ioremap_nocache will fail. It will return NULL.
Kernel can run into a NULL-pointer dereference. This error check
will avoid NULL pointer dereference.
Signed-off-by: Arvind Yadav <arvind.yadav.cs(a)gmail.com>
Acked-by: Vincent Abriou <vincent.abriou(a)st.com>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/gpu/drm/sti/sti_vtg.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/drivers/gpu/drm/sti/sti_vtg.c
+++ b/drivers/gpu/drm/sti/sti_vtg.c
@@ -303,6 +303,10 @@ static int vtg_probe(struct platform_dev
return -ENOMEM;
}
vtg->regs = devm_ioremap_nocache(dev, res->start, resource_size(res));
+ if (!vtg->regs) {
+ DRM_ERROR("failed to remap I/O memory\n");
+ return -ENOMEM;
+ }
np = of_parse_phandle(pdev->dev.of_node, "st,slave", 0);
if (np) {
Patches currently in stable-queue which might be from arvind.yadav.cs(a)gmail.com are
queue-3.18/gpu-drm-mgag200-mgag200_main-handle-error-from-pci_iomap.patch
queue-3.18/media-imon-fix-null-ptr-deref-in-imon_probe.patch
queue-3.18/drm-sti-sti_vtg-handle-return-null-error-from-devm_ioremap_nocache.patch
This is a note to let you know that I've just added the patch titled
backlight: lcd: Fix race condition during register
to the 3.18-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
backlight-lcd-fix-race-condition-during-register.patch
and it can be found in the queue-3.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 12:16:40 CET 2017
From: Uwe Kleine-König <u.kleine-koenig(a)pengutronix.de>
Date: Wed, 6 Jul 2016 19:33:05 +0200
Subject: backlight: lcd: Fix race condition during register
From: Uwe Kleine-König <u.kleine-koenig(a)pengutronix.de>
[ Upstream commit cc21942bce652d1a92dae85b785378256e1df1f7 ]
Once device_register is called for a device its attributes might be
accessed. As the callbacks of a lcd device's attributes make use of the
lcd_ops, the respective member must be setup before calling
device_register.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig(a)pengutronix.de>
Signed-off-by: Lee Jones <lee.jones(a)linaro.org>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/video/backlight/lcd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/video/backlight/lcd.c
+++ b/drivers/video/backlight/lcd.c
@@ -226,6 +226,8 @@ struct lcd_device *lcd_device_register(c
dev_set_name(&new_ld->dev, "%s", name);
dev_set_drvdata(&new_ld->dev, devdata);
+ new_ld->ops = ops;
+
rc = device_register(&new_ld->dev);
if (rc) {
put_device(&new_ld->dev);
@@ -238,8 +240,6 @@ struct lcd_device *lcd_device_register(c
return ERR_PTR(rc);
}
- new_ld->ops = ops;
-
return new_ld;
}
EXPORT_SYMBOL(lcd_device_register);
Patches currently in stable-queue which might be from u.kleine-koenig(a)pengutronix.de are
queue-3.18/backlight-lcd-fix-race-condition-during-register.patch
This is a note to let you know that I've just added the patch titled
backlight: adp5520: Fix error handling in adp5520_bl_probe()
to the 3.18-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
backlight-adp5520-fix-error-handling-in-adp5520_bl_probe.patch
and it can be found in the queue-3.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 12:16:40 CET 2017
From: Alexey Khoroshilov <khoroshilov(a)ispras.ru>
Date: Sat, 9 Jul 2016 01:19:51 +0300
Subject: backlight: adp5520: Fix error handling in adp5520_bl_probe()
From: Alexey Khoroshilov <khoroshilov(a)ispras.ru>
[ Upstream commit 0eb3fba8c68275f0122f65f7316efaaf86448016 ]
If adp5520_bl_setup() fails, sysfs group left unremoved.
By the way, fix overcomplicated assignement of error code.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov(a)ispras.ru>
Acked-by: Michael Hennerich <michael.hennerich(a)analog.com>
Signed-off-by: Lee Jones <lee.jones(a)linaro.org>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/video/backlight/adp5520_bl.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
--- a/drivers/video/backlight/adp5520_bl.c
+++ b/drivers/video/backlight/adp5520_bl.c
@@ -332,10 +332,18 @@ static int adp5520_bl_probe(struct platf
}
platform_set_drvdata(pdev, bl);
- ret |= adp5520_bl_setup(bl);
+ ret = adp5520_bl_setup(bl);
+ if (ret) {
+ dev_err(&pdev->dev, "failed to setup\n");
+ if (data->pdata->en_ambl_sens)
+ sysfs_remove_group(&bl->dev.kobj,
+ &adp5520_bl_attr_group);
+ return ret;
+ }
+
backlight_update_status(bl);
- return ret;
+ return 0;
}
static int adp5520_bl_remove(struct platform_device *pdev)
Patches currently in stable-queue which might be from khoroshilov(a)ispras.ru are
queue-3.18/backlight-adp5520-fix-error-handling-in-adp5520_bl_probe.patch
This is a note to let you know that I've just added the patch titled
ata: SATA_MV should depend on HAS_DMA
to the 3.18-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
ata-sata_mv-should-depend-on-has_dma.patch
and it can be found in the queue-3.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 12:16:40 CET 2017
From: Geert Uytterhoeven <geert(a)linux-m68k.org>
Date: Tue, 3 Jan 2017 19:09:44 +0100
Subject: ata: SATA_MV should depend on HAS_DMA
From: Geert Uytterhoeven <geert(a)linux-m68k.org>
[ Upstream commit 62989cebd367a1aae1e009e1a5b1ec046a4c8fdc ]
If NO_DMA=y:
ERROR: "dma_pool_alloc" [drivers/ata/sata_mv.ko] undefined!
ERROR: "dmam_pool_create" [drivers/ata/sata_mv.ko] undefined!
ERROR: "dma_pool_free" [drivers/ata/sata_mv.ko] undefined!
Add a dependency on HAS_DMA to fix this.
Signed-off-by: Geert Uytterhoeven <geert(a)linux-m68k.org>
Signed-off-by: Tejun Heo <tj(a)kernel.org>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/ata/Kconfig | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -301,6 +301,7 @@ config SATA_HIGHBANK
config SATA_MV
tristate "Marvell SATA support"
+ depends on HAS_DMA
depends on PCI || ARCH_DOVE || ARCH_MV78XX0 || \
ARCH_MVEBU || ARCH_ORION5X || COMPILE_TEST
select GENERIC_PHY
Patches currently in stable-queue which might be from geert(a)linux-m68k.org are
queue-3.18/ata-sata_mv-should-depend-on-has_dma.patch
queue-3.18/ata-sata_highbank-should-depend-on-has_dma.patch
queue-3.18/ata-ata_bmdma-should-depend-on-has_dma.patch
This is a note to let you know that I've just added the patch titled
ata: SATA_HIGHBANK should depend on HAS_DMA
to the 3.18-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
ata-sata_highbank-should-depend-on-has_dma.patch
and it can be found in the queue-3.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 12:16:40 CET 2017
From: Geert Uytterhoeven <geert(a)linux-m68k.org>
Date: Tue, 3 Jan 2017 19:09:45 +0100
Subject: ata: SATA_HIGHBANK should depend on HAS_DMA
From: Geert Uytterhoeven <geert(a)linux-m68k.org>
[ Upstream commit 2a736e0585e585c2566b5119af8381910a170e44 ]
If NO_DMA=y:
ERROR: "bad_dma_ops" [drivers/ata/sata_highbank.ko] undefined!
Add a dependency on HAS_DMA to fix this.
Signed-off-by: Geert Uytterhoeven <geert(a)linux-m68k.org>
Signed-off-by: Tejun Heo <tj(a)kernel.org>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/ata/Kconfig | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -291,6 +291,7 @@ config SATA_DWC_VDEBUG
config SATA_HIGHBANK
tristate "Calxeda Highbank SATA support"
+ depends on HAS_DMA
depends on ARCH_HIGHBANK || COMPILE_TEST
help
This option enables support for the Calxeda Highbank SoC's
Patches currently in stable-queue which might be from geert(a)linux-m68k.org are
queue-3.18/ata-sata_mv-should-depend-on-has_dma.patch
queue-3.18/ata-sata_highbank-should-depend-on-has_dma.patch
queue-3.18/ata-ata_bmdma-should-depend-on-has_dma.patch
This is a note to let you know that I've just added the patch titled
ata: ATA_BMDMA should depend on HAS_DMA
to the 3.18-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
ata-ata_bmdma-should-depend-on-has_dma.patch
and it can be found in the queue-3.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From foo@baz Sun Nov 19 12:16:40 CET 2017
From: Geert Uytterhoeven <geert(a)linux-m68k.org>
Date: Tue, 3 Jan 2017 19:09:46 +0100
Subject: ata: ATA_BMDMA should depend on HAS_DMA
From: Geert Uytterhoeven <geert(a)linux-m68k.org>
[ Upstream commit 7bc7ab1e63dfe004931502f90ce7020e375623da ]
If NO_DMA=y:
ERROR: "dmam_alloc_coherent" [drivers/ata/libata.ko] undefined!
Add a dependency on HAS_DMA to fix this.
Signed-off-by: Geert Uytterhoeven <geert(a)linux-m68k.org>
Signed-off-by: Tejun Heo <tj(a)kernel.org>
Signed-off-by: Sasha Levin <alexander.levin(a)verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/ata/Kconfig | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -245,6 +245,7 @@ config SATA_SX4
config ATA_BMDMA
bool "ATA BMDMA support"
+ depends on HAS_DMA
default y
help
This option adds support for SFF ATA controllers with BMDMA
Patches currently in stable-queue which might be from geert(a)linux-m68k.org are
queue-3.18/ata-sata_mv-should-depend-on-has_dma.patch
queue-3.18/ata-sata_highbank-should-depend-on-has_dma.patch
queue-3.18/ata-ata_bmdma-should-depend-on-has_dma.patch