* [PATCH for 4.9 02/39] net/packet: check length in getsockopt() called with PACKET_HDRLEN
2017-09-18 0:19 [PATCH for 4.9 01/39] net: core: Prevent from dereferencing null pointer when releasing SKB Levin, Alexander (Sasha Levin)
@ 2017-09-18 0:19 ` Levin, Alexander (Sasha Levin)
2017-09-18 0:19 ` [PATCH for 4.9 04/39] usb: plusb: Add support for PL-27A1 Levin, Alexander (Sasha Levin)
` (15 subsequent siblings)
16 siblings, 0 replies; 20+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-09-18 0:19 UTC (permalink / raw)
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Alexander Potapenko, David S . Miller,
Levin, Alexander (Sasha Levin)
From: Alexander Potapenko <glider@google.com>
[ Upstream commit fd2c83b35752f0a8236b976978ad4658df14a59f ]
In the case getsockopt() is called with PACKET_HDRLEN and optlen < 4
|val| remains uninitialized and the syscall may behave differently
depending on its value, and even copy garbage to userspace on certain
architectures. To fix this we now return -EINVAL if optlen is too small.
This bug has been detected with KMSAN.
Signed-off-by: Alexander Potapenko <glider@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
net/packet/af_packet.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index ae7bfd26cd91..2cf706f7defa 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -3878,6 +3878,8 @@ static int packet_getsockopt(struct socket *sock, int level, int optname,
case PACKET_HDRLEN:
if (len > sizeof(int))
len = sizeof(int);
+ if (len < sizeof(int))
+ return -EINVAL;
if (copy_from_user(&val, optval, len))
return -EFAULT;
switch (val) {
--
2.11.0
^ permalink raw reply related [flat|nested] 20+ messages in thread* [PATCH for 4.9 04/39] usb: plusb: Add support for PL-27A1
2017-09-18 0:19 [PATCH for 4.9 01/39] net: core: Prevent from dereferencing null pointer when releasing SKB Levin, Alexander (Sasha Levin)
2017-09-18 0:19 ` [PATCH for 4.9 02/39] net/packet: check length in getsockopt() called with PACKET_HDRLEN Levin, Alexander (Sasha Levin)
@ 2017-09-18 0:19 ` Levin, Alexander (Sasha Levin)
2017-09-18 0:19 ` [PATCH for 4.9 03/39] team: fix memory leaks Levin, Alexander (Sasha Levin)
` (14 subsequent siblings)
16 siblings, 0 replies; 20+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-09-18 0:19 UTC (permalink / raw)
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Roman Spychała, David S . Miller,
Levin, Alexander (Sasha Levin)
From: Roman Spychała <roed@onet.eu>
[ Upstream commit 6f2aee0c0de65013333bbc26fe50c9c7b09a37f7 ]
This patch adds support for the PL-27A1 by adding the appropriate
USB ID's. This chip is used in the goobay Active USB 3.0 Data Link
and Unitek Y-3501 cables.
Signed-off-by: Roman Spychała <roed@onet.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
drivers/net/usb/Kconfig | 2 +-
drivers/net/usb/plusb.c | 15 +++++++++++++--
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig
index cdde59089f72..3a7286256db0 100644
--- a/drivers/net/usb/Kconfig
+++ b/drivers/net/usb/Kconfig
@@ -364,7 +364,7 @@ config USB_NET_NET1080
optionally with LEDs that indicate traffic
config USB_NET_PLUSB
- tristate "Prolific PL-2301/2302/25A1 based cables"
+ tristate "Prolific PL-2301/2302/25A1/27A1 based cables"
# if the handshake/init/reset problems, from original 'plusb',
# are ever resolved ... then remove "experimental"
depends on USB_USBNET
diff --git a/drivers/net/usb/plusb.c b/drivers/net/usb/plusb.c
index 22e1a9a99a7d..6fe59373cba9 100644
--- a/drivers/net/usb/plusb.c
+++ b/drivers/net/usb/plusb.c
@@ -102,7 +102,7 @@ static int pl_reset(struct usbnet *dev)
}
static const struct driver_info prolific_info = {
- .description = "Prolific PL-2301/PL-2302/PL-25A1",
+ .description = "Prolific PL-2301/PL-2302/PL-25A1/PL-27A1",
.flags = FLAG_POINTTOPOINT | FLAG_NO_SETINT,
/* some PL-2302 versions seem to fail usb_set_interface() */
.reset = pl_reset,
@@ -139,6 +139,17 @@ static const struct usb_device_id products [] = {
* Host-to-Host Cable
*/
.driver_info = (unsigned long) &prolific_info,
+
+},
+
+/* super speed cables */
+{
+ USB_DEVICE(0x067b, 0x27a1), /* PL-27A1, no eeprom
+ * also: goobay Active USB 3.0
+ * Data Link,
+ * Unitek Y-3501
+ */
+ .driver_info = (unsigned long) &prolific_info,
},
{ }, // END
@@ -158,5 +169,5 @@ static struct usb_driver plusb_driver = {
module_usb_driver(plusb_driver);
MODULE_AUTHOR("David Brownell");
-MODULE_DESCRIPTION("Prolific PL-2301/2302/25A1 USB Host to Host Link Driver");
+MODULE_DESCRIPTION("Prolific PL-2301/2302/25A1/27A1 USB Host to Host Link Driver");
MODULE_LICENSE("GPL");
--
2.11.0
^ permalink raw reply related [flat|nested] 20+ messages in thread* [PATCH for 4.9 03/39] team: fix memory leaks
2017-09-18 0:19 [PATCH for 4.9 01/39] net: core: Prevent from dereferencing null pointer when releasing SKB Levin, Alexander (Sasha Levin)
2017-09-18 0:19 ` [PATCH for 4.9 02/39] net/packet: check length in getsockopt() called with PACKET_HDRLEN Levin, Alexander (Sasha Levin)
2017-09-18 0:19 ` [PATCH for 4.9 04/39] usb: plusb: Add support for PL-27A1 Levin, Alexander (Sasha Levin)
@ 2017-09-18 0:19 ` Levin, Alexander (Sasha Levin)
2017-09-18 0:19 ` [PATCH for 4.9 08/39] mmc: sdio: fix alignment issue in struct sdio_func Levin, Alexander (Sasha Levin)
` (13 subsequent siblings)
16 siblings, 0 replies; 20+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-09-18 0:19 UTC (permalink / raw)
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Pan Bian, David S . Miller, Levin, Alexander (Sasha Levin)
From: Pan Bian <bianpan2016@163.com>
[ Upstream commit 72ec0bc64b9a5d8e0efcb717abfc757746b101b7 ]
In functions team_nl_send_port_list_get() and
team_nl_send_options_get(), pointer skb keeps the return value of
nlmsg_new(). When the call to genlmsg_put() fails, the memory is not
freed(). This will result in memory leak bugs.
Fixes: 9b00cf2d1024 ("team: implement multipart netlink messages for options transfers")
Signed-off-by: Pan Bian <bianpan2016@163.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
drivers/net/team/team.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index a380649bf6b5..26681707fc7a 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -2366,8 +2366,10 @@ static int team_nl_send_options_get(struct team *team, u32 portid, u32 seq,
hdr = genlmsg_put(skb, portid, seq, &team_nl_family, flags | NLM_F_MULTI,
TEAM_CMD_OPTIONS_GET);
- if (!hdr)
+ if (!hdr) {
+ nlmsg_free(skb);
return -EMSGSIZE;
+ }
if (nla_put_u32(skb, TEAM_ATTR_TEAM_IFINDEX, team->dev->ifindex))
goto nla_put_failure;
@@ -2639,8 +2641,10 @@ static int team_nl_send_port_list_get(struct team *team, u32 portid, u32 seq,
hdr = genlmsg_put(skb, portid, seq, &team_nl_family, flags | NLM_F_MULTI,
TEAM_CMD_PORT_LIST_GET);
- if (!hdr)
+ if (!hdr) {
+ nlmsg_free(skb);
return -EMSGSIZE;
+ }
if (nla_put_u32(skb, TEAM_ATTR_TEAM_IFINDEX, team->dev->ifindex))
goto nla_put_failure;
--
2.11.0
^ permalink raw reply related [flat|nested] 20+ messages in thread* [PATCH for 4.9 08/39] mmc: sdio: fix alignment issue in struct sdio_func
2017-09-18 0:19 [PATCH for 4.9 01/39] net: core: Prevent from dereferencing null pointer when releasing SKB Levin, Alexander (Sasha Levin)
` (2 preceding siblings ...)
2017-09-18 0:19 ` [PATCH for 4.9 03/39] team: fix memory leaks Levin, Alexander (Sasha Levin)
@ 2017-09-18 0:19 ` Levin, Alexander (Sasha Levin)
2017-09-18 0:19 ` [PATCH for 4.9 05/39] udp: disable inner UDP checksum offloads in IPsec case Levin, Alexander (Sasha Levin)
` (12 subsequent siblings)
16 siblings, 0 replies; 20+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-09-18 0:19 UTC (permalink / raw)
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Heiner Kallweit, Ulf Hansson, Levin, Alexander (Sasha Levin)
From: Heiner Kallweit <hkallweit1@gmail.com>
[ Upstream commit 5ef1ecf060f28ecef313b5723f1fd39bf5a35f56 ]
Certain 64-bit systems (e.g. Amlogic Meson GX) require buffers to be
used for DMA to be 8-byte-aligned. struct sdio_func has an embedded
small DMA buffer not meeting this requirement.
When testing switching to descriptor chain mode in meson-gx driver
SDIO is broken therefore. Fix this by allocating the small DMA buffer
separately as kmalloc ensures that the returned memory area is
properly aligned for every basic data type.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Tested-by: Helmut Klein <hgkr.klein@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
drivers/mmc/core/sdio_bus.c | 12 +++++++++++-
include/linux/mmc/sdio_func.h | 2 +-
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c
index 86f5b3223aae..d56a3b6c2fb9 100644
--- a/drivers/mmc/core/sdio_bus.c
+++ b/drivers/mmc/core/sdio_bus.c
@@ -266,7 +266,7 @@ static void sdio_release_func(struct device *dev)
sdio_free_func_cis(func);
kfree(func->info);
-
+ kfree(func->tmpbuf);
kfree(func);
}
@@ -281,6 +281,16 @@ struct sdio_func *sdio_alloc_func(struct mmc_card *card)
if (!func)
return ERR_PTR(-ENOMEM);
+ /*
+ * allocate buffer separately to make sure it's properly aligned for
+ * DMA usage (incl. 64 bit DMA)
+ */
+ func->tmpbuf = kmalloc(4, GFP_KERNEL);
+ if (!func->tmpbuf) {
+ kfree(func);
+ return ERR_PTR(-ENOMEM);
+ }
+
func->card = card;
device_initialize(&func->dev);
diff --git a/include/linux/mmc/sdio_func.h b/include/linux/mmc/sdio_func.h
index aab032a6ae61..97ca105347a6 100644
--- a/include/linux/mmc/sdio_func.h
+++ b/include/linux/mmc/sdio_func.h
@@ -53,7 +53,7 @@ struct sdio_func {
unsigned int state; /* function state */
#define SDIO_STATE_PRESENT (1<<0) /* present in sysfs */
- u8 tmpbuf[4]; /* DMA:able scratch buffer */
+ u8 *tmpbuf; /* DMA:able scratch buffer */
unsigned num_info; /* number of info strings */
const char **info; /* info strings */
--
2.11.0
^ permalink raw reply related [flat|nested] 20+ messages in thread* [PATCH for 4.9 05/39] udp: disable inner UDP checksum offloads in IPsec case
2017-09-18 0:19 [PATCH for 4.9 01/39] net: core: Prevent from dereferencing null pointer when releasing SKB Levin, Alexander (Sasha Levin)
` (3 preceding siblings ...)
2017-09-18 0:19 ` [PATCH for 4.9 08/39] mmc: sdio: fix alignment issue in struct sdio_func Levin, Alexander (Sasha Levin)
@ 2017-09-18 0:19 ` Levin, Alexander (Sasha Levin)
2017-09-18 0:19 ` [PATCH for 4.9 07/39] qed: Fix possible system hang in the dcbnl-getdcbx() path Levin, Alexander (Sasha Levin)
` (11 subsequent siblings)
16 siblings, 0 replies; 20+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-09-18 0:19 UTC (permalink / raw)
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Ansis Atteka, David S . Miller, Levin, Alexander (Sasha Levin)
From: Ansis Atteka <aatteka@ovn.org>
[ Upstream commit b40c5f4fde22fb98eff205b3aece05b471c24eed ]
Otherwise, UDP checksum offloads could corrupt ESP packets by attempting
to calculate UDP checksum when this inner UDP packet is already protected
by IPsec.
One way to reproduce this bug is to have a VM with virtio_net driver (UFO
set to ON in the guest VM); and then encapsulate all guest's Ethernet
frames in Geneve; and then further encrypt Geneve with IPsec. In this
case following symptoms are observed:
1. If using ixgbe NIC, then it will complain with following error message:
ixgbe 0000:01:00.1: partial checksum but l4 proto=32!
2. Receiving IPsec stack will drop all the corrupted ESP packets and
increase XfrmInStateProtoError counter in /proc/net/xfrm_stat.
3. iperf UDP test from the VM with packet sizes above MTU will not work at
all.
4. iperf TCP test from the VM will get ridiculously low performance because.
Signed-off-by: Ansis Atteka <aatteka@ovn.org>
Co-authored-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
net/ipv4/udp_offload.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c
index 6de016f80f17..0932c85b42af 100644
--- a/net/ipv4/udp_offload.c
+++ b/net/ipv4/udp_offload.c
@@ -29,6 +29,7 @@ static struct sk_buff *__skb_udp_tunnel_segment(struct sk_buff *skb,
u16 mac_len = skb->mac_len;
int udp_offset, outer_hlen;
__wsum partial;
+ bool need_ipsec;
if (unlikely(!pskb_may_pull(skb, tnl_hlen)))
goto out;
@@ -62,8 +63,10 @@ static struct sk_buff *__skb_udp_tunnel_segment(struct sk_buff *skb,
ufo = !!(skb_shinfo(skb)->gso_type & SKB_GSO_UDP);
+ need_ipsec = skb_dst(skb) && dst_xfrm(skb_dst(skb));
/* Try to offload checksum if possible */
offload_csum = !!(need_csum &&
+ !need_ipsec &&
(skb->dev->features &
(is_ipv6 ? (NETIF_F_HW_CSUM | NETIF_F_IPV6_CSUM) :
(NETIF_F_HW_CSUM | NETIF_F_IP_CSUM))));
--
2.11.0
^ permalink raw reply related [flat|nested] 20+ messages in thread* [PATCH for 4.9 07/39] qed: Fix possible system hang in the dcbnl-getdcbx() path.
2017-09-18 0:19 [PATCH for 4.9 01/39] net: core: Prevent from dereferencing null pointer when releasing SKB Levin, Alexander (Sasha Levin)
` (4 preceding siblings ...)
2017-09-18 0:19 ` [PATCH for 4.9 05/39] udp: disable inner UDP checksum offloads in IPsec case Levin, Alexander (Sasha Levin)
@ 2017-09-18 0:19 ` Levin, Alexander (Sasha Levin)
2017-09-18 0:19 ` [PATCH for 4.9 09/39] bridge: netlink: register netdevice before executing changelink Levin, Alexander (Sasha Levin)
` (10 subsequent siblings)
16 siblings, 0 replies; 20+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-09-18 0:19 UTC (permalink / raw)
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: sudarsana.kalluru@cavium.com, Sudarsana Reddy Kalluru,
Yuval Mintz, David S . Miller, Levin, Alexander (Sasha Levin)
From: "sudarsana.kalluru@cavium.com" <sudarsana.kalluru@cavium.com>
[ Upstream commit 62289ba27558553871fd047baadaaeda886c6a63 ]
qed_dcbnl_get_dcbx() API uses kmalloc in GFT_KERNEL mode. The API gets
invoked in the interrupt context by qed_dcbnl_getdcbx callback. Need
to invoke this kmalloc in atomic mode.
Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/qed/qed_dcbx.c b/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
index a4789a93b692..9d59cb85c012 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
@@ -1222,7 +1222,7 @@ static struct qed_dcbx_get *qed_dcbnl_get_dcbx(struct qed_hwfn *hwfn,
{
struct qed_dcbx_get *dcbx_info;
- dcbx_info = kzalloc(sizeof(*dcbx_info), GFP_KERNEL);
+ dcbx_info = kmalloc(sizeof(*dcbx_info), GFP_ATOMIC);
if (!dcbx_info)
return NULL;
--
2.11.0
^ permalink raw reply related [flat|nested] 20+ messages in thread* [PATCH for 4.9 09/39] bridge: netlink: register netdevice before executing changelink
2017-09-18 0:19 [PATCH for 4.9 01/39] net: core: Prevent from dereferencing null pointer when releasing SKB Levin, Alexander (Sasha Levin)
` (5 preceding siblings ...)
2017-09-18 0:19 ` [PATCH for 4.9 07/39] qed: Fix possible system hang in the dcbnl-getdcbx() path Levin, Alexander (Sasha Levin)
@ 2017-09-18 0:19 ` Levin, Alexander (Sasha Levin)
2017-09-18 0:19 ` [PATCH for 4.9 06/39] net: dsa: b53: Include IMP/CPU port in dumb forwarding mode Levin, Alexander (Sasha Levin)
` (9 subsequent siblings)
16 siblings, 0 replies; 20+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-09-18 0:19 UTC (permalink / raw)
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Ido Schimmel, Nikolay Aleksandrov, David S . Miller,
Levin, Alexander (Sasha Levin)
From: Ido Schimmel <idosch@mellanox.com>
[ Upstream commit 5b8d5429daa05bebef6ffd3297df3b502cc6f184 ]
Peter reported a kernel oops when executing the following command:
$ ip link add name test type bridge vlan_default_pvid 1
[13634.939408] BUG: unable to handle kernel NULL pointer dereference at
0000000000000190
[13634.939436] IP: __vlan_add+0x73/0x5f0
[...]
[13634.939783] Call Trace:
[13634.939791] ? pcpu_next_unpop+0x3b/0x50
[13634.939801] ? pcpu_alloc+0x3d2/0x680
[13634.939810] ? br_vlan_add+0x135/0x1b0
[13634.939820] ? __br_vlan_set_default_pvid.part.28+0x204/0x2b0
[13634.939834] ? br_changelink+0x120/0x4e0
[13634.939844] ? br_dev_newlink+0x50/0x70
[13634.939854] ? rtnl_newlink+0x5f5/0x8a0
[13634.939864] ? rtnl_newlink+0x176/0x8a0
[13634.939874] ? mem_cgroup_commit_charge+0x7c/0x4e0
[13634.939886] ? rtnetlink_rcv_msg+0xe1/0x220
[13634.939896] ? lookup_fast+0x52/0x370
[13634.939905] ? rtnl_newlink+0x8a0/0x8a0
[13634.939915] ? netlink_rcv_skb+0xa1/0xc0
[13634.939925] ? rtnetlink_rcv+0x24/0x30
[13634.939934] ? netlink_unicast+0x177/0x220
[13634.939944] ? netlink_sendmsg+0x2fe/0x3b0
[13634.939954] ? _copy_from_user+0x39/0x40
[13634.939964] ? sock_sendmsg+0x30/0x40
[13634.940159] ? ___sys_sendmsg+0x29d/0x2b0
[13634.940326] ? __alloc_pages_nodemask+0xdf/0x230
[13634.940478] ? mem_cgroup_commit_charge+0x7c/0x4e0
[13634.940592] ? mem_cgroup_try_charge+0x76/0x1a0
[13634.940701] ? __handle_mm_fault+0xdb9/0x10b0
[13634.940809] ? __sys_sendmsg+0x51/0x90
[13634.940917] ? entry_SYSCALL_64_fastpath+0x1e/0xad
The problem is that the bridge's VLAN group is created after setting the
default PVID, when registering the netdevice and executing its
ndo_init().
Fix this by changing the order of both operations, so that
br_changelink() is only processed after the netdevice is registered,
when the VLAN group is already initialized.
Fixes: b6677449dff6 ("bridge: netlink: call br_changelink() during br_dev_newlink()")
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reported-by: Peter V. Saveliev <peter@svinota.eu>
Tested-by: Peter V. Saveliev <peter@svinota.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
net/bridge/br_netlink.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
index 7625ec8458de..5d4006e589cb 100644
--- a/net/bridge/br_netlink.c
+++ b/net/bridge/br_netlink.c
@@ -1098,11 +1098,14 @@ static int br_dev_newlink(struct net *src_net, struct net_device *dev,
spin_unlock_bh(&br->lock);
}
- err = br_changelink(dev, tb, data);
+ err = register_netdevice(dev);
if (err)
return err;
- return register_netdevice(dev);
+ err = br_changelink(dev, tb, data);
+ if (err)
+ unregister_netdevice(dev);
+ return err;
}
static size_t br_get_size(const struct net_device *brdev)
--
2.11.0
^ permalink raw reply related [flat|nested] 20+ messages in thread* [PATCH for 4.9 06/39] net: dsa: b53: Include IMP/CPU port in dumb forwarding mode
2017-09-18 0:19 [PATCH for 4.9 01/39] net: core: Prevent from dereferencing null pointer when releasing SKB Levin, Alexander (Sasha Levin)
` (6 preceding siblings ...)
2017-09-18 0:19 ` [PATCH for 4.9 09/39] bridge: netlink: register netdevice before executing changelink Levin, Alexander (Sasha Levin)
@ 2017-09-18 0:19 ` Levin, Alexander (Sasha Levin)
2017-09-18 0:19 ` [PATCH for 4.9 12/39] sata_via: Enable hotplug only on VT6421 Levin, Alexander (Sasha Levin)
` (8 subsequent siblings)
16 siblings, 0 replies; 20+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-09-18 0:19 UTC (permalink / raw)
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Florian Fainelli, David S . Miller,
Levin, Alexander (Sasha Levin)
From: Florian Fainelli <f.fainelli@gmail.com>
[ Upstream commit a424f0de61638cbb5047e0a888c54da9cf471f90 ]
Since Broadcom tags are not enabled in b53 (DSA_PROTO_TAG_NONE), we need
to make sure that the IMP/CPU port is included in the forwarding
decision.
Without this change, switching between non-management ports would work,
but not between management ports and non-management ports thus breaking
the default state in which DSA switch are brought up.
Fixes: 967dd82ffc52 ("net: dsa: b53: Add support for Broadcom RoboSwitch")
Reported-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
drivers/net/dsa/b53/b53_common.c | 10 ++++++++++
drivers/net/dsa/b53/b53_regs.h | 4 ++++
2 files changed, 14 insertions(+)
diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index 3ec573c13dac..c26debc531ee 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -326,6 +326,7 @@ static void b53_get_vlan_entry(struct b53_device *dev, u16 vid,
static void b53_set_forwarding(struct b53_device *dev, int enable)
{
+ struct dsa_switch *ds = dev->ds;
u8 mgmt;
b53_read8(dev, B53_CTRL_PAGE, B53_SWITCH_MODE, &mgmt);
@@ -336,6 +337,15 @@ static void b53_set_forwarding(struct b53_device *dev, int enable)
mgmt &= ~SM_SW_FWD_EN;
b53_write8(dev, B53_CTRL_PAGE, B53_SWITCH_MODE, mgmt);
+
+ /* Include IMP port in dumb forwarding mode when no tagging protocol is
+ * set
+ */
+ if (ds->ops->get_tag_protocol(ds) == DSA_TAG_PROTO_NONE) {
+ b53_read8(dev, B53_CTRL_PAGE, B53_SWITCH_CTRL, &mgmt);
+ mgmt |= B53_MII_DUMB_FWDG_EN;
+ b53_write8(dev, B53_CTRL_PAGE, B53_SWITCH_CTRL, mgmt);
+ }
}
static void b53_enable_vlan(struct b53_device *dev, bool enable)
diff --git a/drivers/net/dsa/b53/b53_regs.h b/drivers/net/dsa/b53/b53_regs.h
index dac0af4e2cd0..81044000ce75 100644
--- a/drivers/net/dsa/b53/b53_regs.h
+++ b/drivers/net/dsa/b53/b53_regs.h
@@ -104,6 +104,10 @@
#define B53_UC_FWD_EN BIT(6)
#define B53_MC_FWD_EN BIT(7)
+/* Switch control (8 bit) */
+#define B53_SWITCH_CTRL 0x22
+#define B53_MII_DUMB_FWDG_EN BIT(6)
+
/* (16 bit) */
#define B53_UC_FLOOD_MASK 0x32
#define B53_MC_FLOOD_MASK 0x34
--
2.11.0
^ permalink raw reply related [flat|nested] 20+ messages in thread* [PATCH for 4.9 12/39] sata_via: Enable hotplug only on VT6421
2017-09-18 0:19 [PATCH for 4.9 01/39] net: core: Prevent from dereferencing null pointer when releasing SKB Levin, Alexander (Sasha Levin)
` (7 preceding siblings ...)
2017-09-18 0:19 ` [PATCH for 4.9 06/39] net: dsa: b53: Include IMP/CPU port in dumb forwarding mode Levin, Alexander (Sasha Levin)
@ 2017-09-18 0:19 ` Levin, Alexander (Sasha Levin)
2017-09-18 0:19 ` [PATCH for 4.9 11/39] Btrfs: fix potential use-after-free for cloned bio Levin, Alexander (Sasha Levin)
` (7 subsequent siblings)
16 siblings, 0 replies; 20+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-09-18 0:19 UTC (permalink / raw)
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Ondrej Zary, Tejun Heo, Levin, Alexander (Sasha Levin)
From: Ondrej Zary <linux@rainbow-software.org>
[ Upstream commit 3cf864520e877505158f09075794a08abab11bbe ]
Commit 57e5568fda27 ("sata_via: Implement hotplug for VT6421") adds
hotplug IRQ handler for VT6421 but enables hotplug on all chips. This
is a bug because it causes "irq xx: nobody cared" error on VT6420 when
hot-(un)plugging a drive:
[ 381.839948] irq 20: nobody cared (try booting with the "irqpoll" option)
[ 381.840014] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.10.0-rc5+ #148
[ 381.840066] Hardware name: P4VM800/P4VM800, BIOS P1.60 05/29/2006
[ 381.840117] Call Trace:
[ 381.840167] <IRQ>
[ 381.840225] ? dump_stack+0x44/0x58
[ 381.840278] ? __report_bad_irq+0x14/0x97
[ 381.840327] ? handle_edge_irq+0xa5/0xa5
[ 381.840376] ? note_interrupt+0x155/0x1cf
[ 381.840426] ? handle_edge_irq+0xa5/0xa5
[ 381.840474] ? handle_irq_event_percpu+0x32/0x38
[ 381.840524] ? handle_irq_event+0x1f/0x38
[ 381.840573] ? handle_fasteoi_irq+0x69/0xb8
[ 381.840625] ? handle_irq+0x4f/0x5d
[ 381.840672] </IRQ>
[ 381.840726] ? do_IRQ+0x2e/0x8b
[ 381.840782] ? common_interrupt+0x2c/0x34
[ 381.840836] ? mwait_idle+0x60/0x82
[ 381.840892] ? arch_cpu_idle+0x6/0x7
[ 381.840949] ? do_idle+0x96/0x18e
[ 381.841002] ? cpu_startup_entry+0x16/0x1a
[ 381.841057] ? start_kernel+0x319/0x31c
[ 381.841111] ? startup_32_smp+0x166/0x168
[ 381.841165] handlers:
[ 381.841219] [<c12a7263>] ata_bmdma_interrupt
[ 381.841274] Disabling IRQ #20
Seems that VT6420 can do hotplug too (there's no documentation) but the
comments say that SCR register access (required for detecting hotplug
events) can cause problems on these chips.
For now, just keep hotplug disabled on anything other than VT6421.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
drivers/ata/sata_via.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c
index 0636d84fbefe..f3f538eec7b3 100644
--- a/drivers/ata/sata_via.c
+++ b/drivers/ata/sata_via.c
@@ -644,14 +644,16 @@ static void svia_configure(struct pci_dev *pdev, int board_id,
pci_write_config_byte(pdev, SATA_NATIVE_MODE, tmp8);
}
- /* enable IRQ on hotplug */
- pci_read_config_byte(pdev, SVIA_MISC_3, &tmp8);
- if ((tmp8 & SATA_HOTPLUG) != SATA_HOTPLUG) {
- dev_dbg(&pdev->dev,
- "enabling SATA hotplug (0x%x)\n",
- (int) tmp8);
- tmp8 |= SATA_HOTPLUG;
- pci_write_config_byte(pdev, SVIA_MISC_3, tmp8);
+ if (board_id == vt6421) {
+ /* enable IRQ on hotplug */
+ pci_read_config_byte(pdev, SVIA_MISC_3, &tmp8);
+ if ((tmp8 & SATA_HOTPLUG) != SATA_HOTPLUG) {
+ dev_dbg(&pdev->dev,
+ "enabling SATA hotplug (0x%x)\n",
+ (int) tmp8);
+ tmp8 |= SATA_HOTPLUG;
+ pci_write_config_byte(pdev, SVIA_MISC_3, tmp8);
+ }
}
/*
--
2.11.0
^ permalink raw reply related [flat|nested] 20+ messages in thread* [PATCH for 4.9 11/39] Btrfs: fix potential use-after-free for cloned bio
2017-09-18 0:19 [PATCH for 4.9 01/39] net: core: Prevent from dereferencing null pointer when releasing SKB Levin, Alexander (Sasha Levin)
` (8 preceding siblings ...)
2017-09-18 0:19 ` [PATCH for 4.9 12/39] sata_via: Enable hotplug only on VT6421 Levin, Alexander (Sasha Levin)
@ 2017-09-18 0:19 ` Levin, Alexander (Sasha Levin)
2017-09-18 0:19 ` [PATCH for 4.9 10/39] Btrfs: fix segmentation fault when doing dio read Levin, Alexander (Sasha Levin)
` (6 subsequent siblings)
16 siblings, 0 replies; 20+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-09-18 0:19 UTC (permalink / raw)
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Liu Bo, David Sterba, Levin, Alexander (Sasha Levin)
From: Liu Bo <bo.li.liu@oracle.com>
[ Upstream commit a967efb30b3afa3d858edd6a17f544f9e9e46eea ]
KASAN reports that there is a use-after-free case of bio in btrfs_map_bio.
If we need to submit IOs to several disks at a time, the original bio
would get cloned and mapped to the destination disk, but we really should
use the original bio instead of a cloned bio to do the sanity check
because cloned bios are likely to be freed by its endio.
Reported-by: Diego <diegocg@gmail.com>
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
fs/btrfs/volumes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 71a60cc01451..06a77e47957d 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -6226,7 +6226,7 @@ int btrfs_map_bio(struct btrfs_root *root, struct bio *bio,
for (dev_nr = 0; dev_nr < total_devs; dev_nr++) {
dev = bbio->stripes[dev_nr].dev;
if (!dev || !dev->bdev ||
- (bio_op(bio) == REQ_OP_WRITE && !dev->writeable)) {
+ (bio_op(first_bio) == REQ_OP_WRITE && !dev->writeable)) {
bbio_error(bbio, first_bio, logical);
continue;
}
--
2.11.0
^ permalink raw reply related [flat|nested] 20+ messages in thread* [PATCH for 4.9 10/39] Btrfs: fix segmentation fault when doing dio read
2017-09-18 0:19 [PATCH for 4.9 01/39] net: core: Prevent from dereferencing null pointer when releasing SKB Levin, Alexander (Sasha Levin)
` (9 preceding siblings ...)
2017-09-18 0:19 ` [PATCH for 4.9 11/39] Btrfs: fix potential use-after-free for cloned bio Levin, Alexander (Sasha Levin)
@ 2017-09-18 0:19 ` Levin, Alexander (Sasha Levin)
2017-09-18 0:19 ` [PATCH for 4.9 16/39] netfilter: invoke synchronize_rcu after set the _hook_ to NULL Levin, Alexander (Sasha Levin)
` (5 subsequent siblings)
16 siblings, 0 replies; 20+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-09-18 0:19 UTC (permalink / raw)
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Liu Bo, David Sterba, Levin, Alexander (Sasha Levin)
From: Liu Bo <bo.li.liu@oracle.com>
[ Upstream commit 97bf5a5589aa3a59c60aa775fc12ec0483fc5002 ]
Commit 2dabb3248453 ("Btrfs: Direct I/O read: Work on sectorsized blocks")
introduced this bug during iterating bio pages in dio read's endio hook,
and it could end up with segment fault of the dio reading task.
So the reason is 'if (nr_sectors--)', and it makes the code assume that
there is one more block in the same page, so page offset is increased and
the bio which is created to repair the bad block then has an incorrect
bvec.bv_offset, and a later access of the page content would throw a
segmentation fault.
This also adds ASSERT to check page offset against page size.
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
fs/btrfs/inode.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 8a05fa7e2152..f089d7d8afe7 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -8050,8 +8050,10 @@ static int __btrfs_correct_data_nocsum(struct inode *inode,
start += sectorsize;
- if (nr_sectors--) {
+ nr_sectors--;
+ if (nr_sectors) {
pgoff += sectorsize;
+ ASSERT(pgoff < PAGE_SIZE);
goto next_block_or_try_again;
}
}
@@ -8157,8 +8159,10 @@ static int __btrfs_subio_endio_read(struct inode *inode,
ASSERT(nr_sectors);
- if (--nr_sectors) {
+ nr_sectors--;
+ if (nr_sectors) {
pgoff += sectorsize;
+ ASSERT(pgoff < PAGE_SIZE);
goto next_block;
}
}
--
2.11.0
^ permalink raw reply related [flat|nested] 20+ messages in thread* [PATCH for 4.9 16/39] netfilter: invoke synchronize_rcu after set the _hook_ to NULL
2017-09-18 0:19 [PATCH for 4.9 01/39] net: core: Prevent from dereferencing null pointer when releasing SKB Levin, Alexander (Sasha Levin)
` (10 preceding siblings ...)
2017-09-18 0:19 ` [PATCH for 4.9 10/39] Btrfs: fix segmentation fault when doing dio read Levin, Alexander (Sasha Levin)
@ 2017-09-18 0:19 ` Levin, Alexander (Sasha Levin)
2017-09-18 0:19 ` [PATCH for 4.9 14/39] kasan: do not sanitize kexec purgatory Levin, Alexander (Sasha Levin)
` (4 subsequent siblings)
16 siblings, 0 replies; 20+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-09-18 0:19 UTC (permalink / raw)
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Liping Zhang, Pablo Neira Ayuso, Levin, Alexander (Sasha Levin)
From: Liping Zhang <zlpnobody@gmail.com>
[ Upstream commit 3b7dabf029478bb80507a6c4500ca94132a2bc0b ]
Otherwise, another CPU may access the invalid pointer. For example:
CPU0 CPU1
- rcu_read_lock();
- pfunc = _hook_;
_hook_ = NULL; -
mod unload -
- pfunc(); // invalid, panic
- rcu_read_unlock();
So we must call synchronize_rcu() to wait the rcu reader to finish.
Also note, in nf_nat_snmp_basic_fini, synchronize_rcu() will be invoked
by later nf_conntrack_helper_unregister, but I'm inclined to add a
explicit synchronize_rcu after set the nf_nat_snmp_hook to NULL. Depend
on such obscure assumptions is not a good idea.
Last, in nfnetlink_cttimeout, we use kfree_rcu to free the time object,
so in cttimeout_exit, invoking rcu_barrier() is not necessary at all,
remove it too.
Signed-off-by: Liping Zhang <zlpnobody@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
net/ipv4/netfilter/nf_nat_snmp_basic.c | 1 +
net/netfilter/nf_conntrack_ecache.c | 2 ++
net/netfilter/nf_conntrack_netlink.c | 1 +
net/netfilter/nf_nat_core.c | 2 ++
net/netfilter/nfnetlink_cttimeout.c | 2 +-
5 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/net/ipv4/netfilter/nf_nat_snmp_basic.c b/net/ipv4/netfilter/nf_nat_snmp_basic.c
index c9b52c361da2..5a8f7c360887 100644
--- a/net/ipv4/netfilter/nf_nat_snmp_basic.c
+++ b/net/ipv4/netfilter/nf_nat_snmp_basic.c
@@ -1304,6 +1304,7 @@ static int __init nf_nat_snmp_basic_init(void)
static void __exit nf_nat_snmp_basic_fini(void)
{
RCU_INIT_POINTER(nf_nat_snmp_hook, NULL);
+ synchronize_rcu();
nf_conntrack_helper_unregister(&snmp_trap_helper);
}
diff --git a/net/netfilter/nf_conntrack_ecache.c b/net/netfilter/nf_conntrack_ecache.c
index da9df2d56e66..22fc32143e9c 100644
--- a/net/netfilter/nf_conntrack_ecache.c
+++ b/net/netfilter/nf_conntrack_ecache.c
@@ -290,6 +290,7 @@ void nf_conntrack_unregister_notifier(struct net *net,
BUG_ON(notify != new);
RCU_INIT_POINTER(net->ct.nf_conntrack_event_cb, NULL);
mutex_unlock(&nf_ct_ecache_mutex);
+ /* synchronize_rcu() is called from ctnetlink_exit. */
}
EXPORT_SYMBOL_GPL(nf_conntrack_unregister_notifier);
@@ -326,6 +327,7 @@ void nf_ct_expect_unregister_notifier(struct net *net,
BUG_ON(notify != new);
RCU_INIT_POINTER(net->ct.nf_expect_event_cb, NULL);
mutex_unlock(&nf_ct_ecache_mutex);
+ /* synchronize_rcu() is called from ctnetlink_exit. */
}
EXPORT_SYMBOL_GPL(nf_ct_expect_unregister_notifier);
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index 04111c1c3988..d5caed5bcfb1 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -3413,6 +3413,7 @@ static void __exit ctnetlink_exit(void)
#ifdef CONFIG_NETFILTER_NETLINK_GLUE_CT
RCU_INIT_POINTER(nfnl_ct_hook, NULL);
#endif
+ synchronize_rcu();
}
module_init(ctnetlink_init);
diff --git a/net/netfilter/nf_nat_core.c b/net/netfilter/nf_nat_core.c
index dde64c4565d2..2916f4815c9c 100644
--- a/net/netfilter/nf_nat_core.c
+++ b/net/netfilter/nf_nat_core.c
@@ -892,6 +892,8 @@ static void __exit nf_nat_cleanup(void)
#ifdef CONFIG_XFRM
RCU_INIT_POINTER(nf_nat_decode_session_hook, NULL);
#endif
+ synchronize_rcu();
+
for (i = 0; i < NFPROTO_NUMPROTO; i++)
kfree(nf_nat_l4protos[i]);
diff --git a/net/netfilter/nfnetlink_cttimeout.c b/net/netfilter/nfnetlink_cttimeout.c
index 139e0867e56e..47d6656c9119 100644
--- a/net/netfilter/nfnetlink_cttimeout.c
+++ b/net/netfilter/nfnetlink_cttimeout.c
@@ -646,8 +646,8 @@ static void __exit cttimeout_exit(void)
#ifdef CONFIG_NF_CONNTRACK_TIMEOUT
RCU_INIT_POINTER(nf_ct_timeout_find_get_hook, NULL);
RCU_INIT_POINTER(nf_ct_timeout_put_hook, NULL);
+ synchronize_rcu();
#endif /* CONFIG_NF_CONNTRACK_TIMEOUT */
- rcu_barrier();
}
module_init(cttimeout_init);
--
2.11.0
^ permalink raw reply related [flat|nested] 20+ messages in thread* [PATCH for 4.9 14/39] kasan: do not sanitize kexec purgatory
2017-09-18 0:19 [PATCH for 4.9 01/39] net: core: Prevent from dereferencing null pointer when releasing SKB Levin, Alexander (Sasha Levin)
` (11 preceding siblings ...)
2017-09-18 0:19 ` [PATCH for 4.9 16/39] netfilter: invoke synchronize_rcu after set the _hook_ to NULL Levin, Alexander (Sasha Levin)
@ 2017-09-18 0:19 ` Levin, Alexander (Sasha Levin)
2017-09-18 0:19 ` [PATCH for 4.9 13/39] hugetlbfs: initialize shared policy as part of inode allocation Levin, Alexander (Sasha Levin)
` (3 subsequent siblings)
16 siblings, 0 replies; 20+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-09-18 0:19 UTC (permalink / raw)
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Mike Galbraith, Alexander Potapenko, Andrey Ryabinin,
Dmitry Vyukov, Andrew Morton, Linus Torvalds,
Levin, Alexander (Sasha Levin)
From: Mike Galbraith <efault@gmx.de>
[ Upstream commit 13a6798e4a03096b11bf402a063786a7be55d426 ]
Fixes this:
kexec: Undefined symbol: __asan_load8_noabort
kexec-bzImage64: Loading purgatory failed
Link: http://lkml.kernel.org/r/1489672155.4458.7.camel@gmx.de
Signed-off-by: Mike Galbraith <efault@gmx.de>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
arch/x86/purgatory/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/purgatory/Makefile b/arch/x86/purgatory/Makefile
index 555b9fa0ad43..7dbdb780264d 100644
--- a/arch/x86/purgatory/Makefile
+++ b/arch/x86/purgatory/Makefile
@@ -8,6 +8,7 @@ PURGATORY_OBJS = $(addprefix $(obj)/,$(purgatory-y))
LDFLAGS_purgatory.ro := -e purgatory_start -r --no-undefined -nostdlib -z nodefaultlib
targets += purgatory.ro
+KASAN_SANITIZE := n
KCOV_INSTRUMENT := n
# Default KBUILD_CFLAGS can have -pg option set when FTRACE is enabled. That
--
2.11.0
^ permalink raw reply related [flat|nested] 20+ messages in thread* [PATCH for 4.9 13/39] hugetlbfs: initialize shared policy as part of inode allocation
2017-09-18 0:19 [PATCH for 4.9 01/39] net: core: Prevent from dereferencing null pointer when releasing SKB Levin, Alexander (Sasha Levin)
` (12 preceding siblings ...)
2017-09-18 0:19 ` [PATCH for 4.9 14/39] kasan: do not sanitize kexec purgatory Levin, Alexander (Sasha Levin)
@ 2017-09-18 0:19 ` Levin, Alexander (Sasha Levin)
2017-09-18 0:19 ` [PATCH for 4.9 15/39] drivers/rapidio/devices/tsi721.c: make module parameter variable name unique Levin, Alexander (Sasha Levin)
` (2 subsequent siblings)
16 siblings, 0 replies; 20+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-09-18 0:19 UTC (permalink / raw)
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Mike Kravetz, Tetsuo Handa, Michal Hocko, Dave Hansen,
Andrew Morton, Linus Torvalds, Levin, Alexander (Sasha Levin)
From: Mike Kravetz <mike.kravetz@oracle.com>
[ Upstream commit 4742a35d9de745e867405b4311e1aac412f0ace1 ]
Any time after inode allocation, destroy_inode can be called. The
hugetlbfs inode contains a shared_policy structure, and
mpol_free_shared_policy is unconditionally called as part of
hugetlbfs_destroy_inode. Initialize the policy as part of inode
allocation so that any quick (error path) calls to destroy_inode will be
handed an initialized policy.
syzkaller fuzzer found this bug, that resulted in the following:
BUG: KASAN: user-memory-access in atomic_inc
include/asm-generic/atomic-instrumented.h:87 [inline] at addr
000000131730bd7a
BUG: KASAN: user-memory-access in __lock_acquire+0x21a/0x3a80
kernel/locking/lockdep.c:3239 at addr 000000131730bd7a
Write of size 4 by task syz-executor6/14086
CPU: 3 PID: 14086 Comm: syz-executor6 Not tainted 4.11.0-rc3+ #364
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
Call Trace:
atomic_inc include/asm-generic/atomic-instrumented.h:87 [inline]
__lock_acquire+0x21a/0x3a80 kernel/locking/lockdep.c:3239
lock_acquire+0x1ee/0x590 kernel/locking/lockdep.c:3762
__raw_write_lock include/linux/rwlock_api_smp.h:210 [inline]
_raw_write_lock+0x33/0x50 kernel/locking/spinlock.c:295
mpol_free_shared_policy+0x43/0xb0 mm/mempolicy.c:2536
hugetlbfs_destroy_inode+0xca/0x120 fs/hugetlbfs/inode.c:952
alloc_inode+0x10d/0x180 fs/inode.c:216
new_inode_pseudo+0x69/0x190 fs/inode.c:889
new_inode+0x1c/0x40 fs/inode.c:918
hugetlbfs_get_inode+0x40/0x420 fs/hugetlbfs/inode.c:734
hugetlb_file_setup+0x329/0x9f0 fs/hugetlbfs/inode.c:1282
newseg+0x422/0xd30 ipc/shm.c:575
ipcget_new ipc/util.c:285 [inline]
ipcget+0x21e/0x580 ipc/util.c:639
SYSC_shmget ipc/shm.c:673 [inline]
SyS_shmget+0x158/0x230 ipc/shm.c:657
entry_SYSCALL_64_fastpath+0x1f/0xc2
Analysis provided by Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Link: http://lkml.kernel.org/r/1490477850-7944-1-git-send-email-mike.kravetz@oracle.com
Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
fs/hugetlbfs/inode.c | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index 704fa0b17309..2c2f182cde03 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -695,14 +695,11 @@ static struct inode *hugetlbfs_get_root(struct super_block *sb,
inode = new_inode(sb);
if (inode) {
- struct hugetlbfs_inode_info *info;
inode->i_ino = get_next_ino();
inode->i_mode = S_IFDIR | config->mode;
inode->i_uid = config->uid;
inode->i_gid = config->gid;
inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
- info = HUGETLBFS_I(inode);
- mpol_shared_policy_init(&info->policy, NULL);
inode->i_op = &hugetlbfs_dir_inode_operations;
inode->i_fop = &simple_dir_operations;
/* directory inodes start off with i_nlink == 2 (for "." entry) */
@@ -733,7 +730,6 @@ static struct inode *hugetlbfs_get_inode(struct super_block *sb,
inode = new_inode(sb);
if (inode) {
- struct hugetlbfs_inode_info *info;
inode->i_ino = get_next_ino();
inode_init_owner(inode, dir, mode);
lockdep_set_class(&inode->i_mapping->i_mmap_rwsem,
@@ -741,15 +737,6 @@ static struct inode *hugetlbfs_get_inode(struct super_block *sb,
inode->i_mapping->a_ops = &hugetlbfs_aops;
inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
inode->i_mapping->private_data = resv_map;
- info = HUGETLBFS_I(inode);
- /*
- * The policy is initialized here even if we are creating a
- * private inode because initialization simply creates an
- * an empty rb tree and calls rwlock_init(), later when we
- * call mpol_free_shared_policy() it will just return because
- * the rb tree will still be empty.
- */
- mpol_shared_policy_init(&info->policy, NULL);
switch (mode & S_IFMT) {
default:
init_special_inode(inode, mode, dev);
@@ -937,6 +924,18 @@ static struct inode *hugetlbfs_alloc_inode(struct super_block *sb)
hugetlbfs_inc_free_inodes(sbinfo);
return NULL;
}
+
+ /*
+ * Any time after allocation, hugetlbfs_destroy_inode can be called
+ * for the inode. mpol_free_shared_policy is unconditionally called
+ * as part of hugetlbfs_destroy_inode. So, initialize policy here
+ * in case of a quick call to destroy.
+ *
+ * Note that the policy is initialized even if we are creating a
+ * private inode. This simplifies hugetlbfs_destroy_inode.
+ */
+ mpol_shared_policy_init(&p->policy, NULL);
+
return &p->vfs_inode;
}
--
2.11.0
^ permalink raw reply related [flat|nested] 20+ messages in thread* [PATCH for 4.9 15/39] drivers/rapidio/devices/tsi721.c: make module parameter variable name unique
2017-09-18 0:19 [PATCH for 4.9 01/39] net: core: Prevent from dereferencing null pointer when releasing SKB Levin, Alexander (Sasha Levin)
` (13 preceding siblings ...)
2017-09-18 0:19 ` [PATCH for 4.9 13/39] hugetlbfs: initialize shared policy as part of inode allocation Levin, Alexander (Sasha Levin)
@ 2017-09-18 0:19 ` Levin, Alexander (Sasha Levin)
2017-09-18 0:19 ` [PATCH for 4.9 17/39] MIPS: IRQ Stack: Unwind IRQ stack onto task stack Levin, Alexander (Sasha Levin)
2017-09-18 6:41 ` [PATCH for 4.9 01/39] net: core: Prevent from dereferencing null pointer when releasing SKB Greg KH
16 siblings, 0 replies; 20+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-09-18 0:19 UTC (permalink / raw)
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Randy Dunlap, Greg Kroah-Hartman, Matt Porter, Alexandre Bounine,
Jérémy Lefaure, Andrew Morton, Linus Torvalds,
Levin, Alexander (Sasha Levin)
From: Randy Dunlap <rdunlap@infradead.org>
[ Upstream commit 4785603bd05b0b029c647080937674d9991600f9 ]
kbuild test robot reported a non-static variable name collision between
a staging driver and a RapidIO driver, with a generic variable name of
'dbg_level'.
Both drivers should be changed so that they don't use this generic
public variable name. This patch fixes the RapidIO driver but does not
change the user interface (name) for the module parameter.
drivers/staging/built-in.o:(.bss+0x109d0): multiple definition of `dbg_level'
drivers/rapidio/built-in.o:(.bss+0x16c): first defined here
Link: http://lkml.kernel.org/r/ab527fc5-aa3c-4b07-5d48-eef5de703192@infradead.org
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
drivers/rapidio/devices/tsi721.c | 4 ++--
drivers/rapidio/devices/tsi721.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/rapidio/devices/tsi721.c b/drivers/rapidio/devices/tsi721.c
index 9d19b9a62011..315a4be8dc1e 100644
--- a/drivers/rapidio/devices/tsi721.c
+++ b/drivers/rapidio/devices/tsi721.c
@@ -37,8 +37,8 @@
#include "tsi721.h"
#ifdef DEBUG
-u32 dbg_level;
-module_param(dbg_level, uint, S_IWUSR | S_IRUGO);
+u32 tsi_dbg_level;
+module_param_named(dbg_level, tsi_dbg_level, uint, S_IWUSR | S_IRUGO);
MODULE_PARM_DESC(dbg_level, "Debugging output level (default 0 = none)");
#endif
diff --git a/drivers/rapidio/devices/tsi721.h b/drivers/rapidio/devices/tsi721.h
index 5941437cbdd1..957eadc58150 100644
--- a/drivers/rapidio/devices/tsi721.h
+++ b/drivers/rapidio/devices/tsi721.h
@@ -40,11 +40,11 @@ enum {
};
#ifdef DEBUG
-extern u32 dbg_level;
+extern u32 tsi_dbg_level;
#define tsi_debug(level, dev, fmt, arg...) \
do { \
- if (DBG_##level & dbg_level) \
+ if (DBG_##level & tsi_dbg_level) \
dev_dbg(dev, "%s: " fmt "\n", __func__, ##arg); \
} while (0)
#else
--
2.11.0
^ permalink raw reply related [flat|nested] 20+ messages in thread* [PATCH for 4.9 17/39] MIPS: IRQ Stack: Unwind IRQ stack onto task stack
2017-09-18 0:19 [PATCH for 4.9 01/39] net: core: Prevent from dereferencing null pointer when releasing SKB Levin, Alexander (Sasha Levin)
` (14 preceding siblings ...)
2017-09-18 0:19 ` [PATCH for 4.9 15/39] drivers/rapidio/devices/tsi721.c: make module parameter variable name unique Levin, Alexander (Sasha Levin)
@ 2017-09-18 0:19 ` Levin, Alexander (Sasha Levin)
2017-09-18 6:41 ` [PATCH for 4.9 01/39] net: core: Prevent from dereferencing null pointer when releasing SKB Greg KH
16 siblings, 0 replies; 20+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-09-18 0:19 UTC (permalink / raw)
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Matt Redfearn, Paolo Bonzini, Marcin Nowakowski, Masanari Iida,
Chris Metcalf, James Hogan, Paul Burton, Ingo Molnar,
Jason A . Donenfeld, Andrew Morton, linux-mips@linux-mips.org,
Ralf Baechle, Levin, Alexander (Sasha Levin)
From: Matt Redfearn <matt.redfearn@imgtec.com>
[ Upstream commit db8466c581cca1a08b505f1319c3ecd246f16fa8 ]
When the separate IRQ stack was introduced, stack unwinding only
proceeded as far as the top of the IRQ stack, leading to kernel
backtraces being less useful, lacking the trace of what was interrupted.
Fix this by providing a means for the kernel to unwind the IRQ stack
onto the interrupted task stack. The processor state is saved to the
kernel task stack on interrupt. The IRQ_STACK_START macro reserves an
unsigned long at the top of the IRQ stack where the interrupted task
stack pointer can be saved. After the active stack is switched to the
IRQ stack, save the interrupted tasks stack pointer to the reserved
location.
Fix the stack unwinding code to look for the frame being the top of the
IRQ stack and if so get the next frame from the saved location. The
existing test does not work with the separate stack since the ra is no
longer pointed at ret_from_{irq,exception}.
The test to stop unwinding the stack 32 bytes from the top of a stack
must be modified to allow unwinding to continue up to the location of
the saved task stack pointer when on the IRQ stack. The low / high marks
of the stack are set depending on whether the sp is on an irq stack or
not.
Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
Cc: Masanari Iida <standby24x7@gmail.com>
Cc: Chris Metcalf <cmetcalf@mellanox.com>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jason A. Donenfeld <jason@zx2c4.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/15788/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
arch/mips/include/asm/irq.h | 15 +++++++++++
arch/mips/kernel/asm-offsets.c | 1 +
arch/mips/kernel/genex.S | 8 ++++--
arch/mips/kernel/process.c | 56 ++++++++++++++++++++++++++++--------------
4 files changed, 60 insertions(+), 20 deletions(-)
diff --git a/arch/mips/include/asm/irq.h b/arch/mips/include/asm/irq.h
index 956db6e201d1..ddd1c918103b 100644
--- a/arch/mips/include/asm/irq.h
+++ b/arch/mips/include/asm/irq.h
@@ -18,9 +18,24 @@
#include <irq.h>
#define IRQ_STACK_SIZE THREAD_SIZE
+#define IRQ_STACK_START (IRQ_STACK_SIZE - sizeof(unsigned long))
extern void *irq_stack[NR_CPUS];
+/*
+ * The highest address on the IRQ stack contains a dummy frame put down in
+ * genex.S (handle_int & except_vec_vi_handler) which is structured as follows:
+ *
+ * top ------------
+ * | task sp | <- irq_stack[cpu] + IRQ_STACK_START
+ * ------------
+ * | | <- First frame of IRQ context
+ * ------------
+ *
+ * task sp holds a copy of the task stack pointer where the struct pt_regs
+ * from exception entry can be found.
+ */
+
static inline bool on_irq_stack(int cpu, unsigned long sp)
{
unsigned long low = (unsigned long)irq_stack[cpu];
diff --git a/arch/mips/kernel/asm-offsets.c b/arch/mips/kernel/asm-offsets.c
index 4be2763f835d..bfff6ea45d51 100644
--- a/arch/mips/kernel/asm-offsets.c
+++ b/arch/mips/kernel/asm-offsets.c
@@ -103,6 +103,7 @@ void output_thread_info_defines(void)
DEFINE(_THREAD_SIZE, THREAD_SIZE);
DEFINE(_THREAD_MASK, THREAD_MASK);
DEFINE(_IRQ_STACK_SIZE, IRQ_STACK_SIZE);
+ DEFINE(_IRQ_STACK_START, IRQ_STACK_START);
BLANK();
}
diff --git a/arch/mips/kernel/genex.S b/arch/mips/kernel/genex.S
index 2ac6c2625c13..ae810da4d499 100644
--- a/arch/mips/kernel/genex.S
+++ b/arch/mips/kernel/genex.S
@@ -215,9 +215,11 @@ NESTED(handle_int, PT_SIZE, sp)
beq t0, t1, 2f
/* Switch to IRQ stack */
- li t1, _IRQ_STACK_SIZE
+ li t1, _IRQ_STACK_START
PTR_ADD sp, t0, t1
+ /* Save task's sp on IRQ stack so that unwinding can follow it */
+ LONG_S s1, 0(sp)
2:
jal plat_irq_dispatch
@@ -325,9 +327,11 @@ NESTED(except_vec_vi_handler, 0, sp)
beq t0, t1, 2f
/* Switch to IRQ stack */
- li t1, _IRQ_STACK_SIZE
+ li t1, _IRQ_STACK_START
PTR_ADD sp, t0, t1
+ /* Save task's sp on IRQ stack so that unwinding can follow it */
+ LONG_S s1, 0(sp)
2:
jalr v0
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
index fbbf5fcc695a..1b50958a1373 100644
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -487,31 +487,52 @@ unsigned long notrace unwind_stack_by_address(unsigned long stack_page,
unsigned long pc,
unsigned long *ra)
{
+ unsigned long low, high, irq_stack_high;
struct mips_frame_info info;
unsigned long size, ofs;
+ struct pt_regs *regs;
int leaf;
- extern void ret_from_irq(void);
- extern void ret_from_exception(void);
if (!stack_page)
return 0;
/*
- * If we reached the bottom of interrupt context,
- * return saved pc in pt_regs.
+ * IRQ stacks start at IRQ_STACK_START
+ * task stacks at THREAD_SIZE - 32
*/
- if (pc == (unsigned long)ret_from_irq ||
- pc == (unsigned long)ret_from_exception) {
- struct pt_regs *regs;
- if (*sp >= stack_page &&
- *sp + sizeof(*regs) <= stack_page + THREAD_SIZE - 32) {
- regs = (struct pt_regs *)*sp;
- pc = regs->cp0_epc;
- if (!user_mode(regs) && __kernel_text_address(pc)) {
- *sp = regs->regs[29];
- *ra = regs->regs[31];
- return pc;
- }
+ low = stack_page;
+ if (!preemptible() && on_irq_stack(raw_smp_processor_id(), *sp)) {
+ high = stack_page + IRQ_STACK_START;
+ irq_stack_high = high;
+ } else {
+ high = stack_page + THREAD_SIZE - 32;
+ irq_stack_high = 0;
+ }
+
+ /*
+ * If we reached the top of the interrupt stack, start unwinding
+ * the interrupted task stack.
+ */
+ if (unlikely(*sp == irq_stack_high)) {
+ unsigned long task_sp = *(unsigned long *)*sp;
+
+ /*
+ * Check that the pointer saved in the IRQ stack head points to
+ * something within the stack of the current task
+ */
+ if (!object_is_on_stack((void *)task_sp))
+ return 0;
+
+ /*
+ * Follow pointer to tasks kernel stack frame where interrupted
+ * state was saved.
+ */
+ regs = (struct pt_regs *)task_sp;
+ pc = regs->cp0_epc;
+ if (!user_mode(regs) && __kernel_text_address(pc)) {
+ *sp = regs->regs[29];
+ *ra = regs->regs[31];
+ return pc;
}
return 0;
}
@@ -532,8 +553,7 @@ unsigned long notrace unwind_stack_by_address(unsigned long stack_page,
if (leaf < 0)
return 0;
- if (*sp < stack_page ||
- *sp + info.frame_size > stack_page + THREAD_SIZE - 32)
+ if (*sp < low || *sp + info.frame_size > high)
return 0;
if (leaf)
--
2.11.0
^ permalink raw reply related [flat|nested] 20+ messages in thread* Re: [PATCH for 4.9 01/39] net: core: Prevent from dereferencing null pointer when releasing SKB
2017-09-18 0:19 [PATCH for 4.9 01/39] net: core: Prevent from dereferencing null pointer when releasing SKB Levin, Alexander (Sasha Levin)
` (15 preceding siblings ...)
2017-09-18 0:19 ` [PATCH for 4.9 17/39] MIPS: IRQ Stack: Unwind IRQ stack onto task stack Levin, Alexander (Sasha Levin)
@ 2017-09-18 6:41 ` Greg KH
2017-09-18 14:13 ` Levin, Alexander (Sasha Levin)
16 siblings, 1 reply; 20+ messages in thread
From: Greg KH @ 2017-09-18 6:41 UTC (permalink / raw)
To: Levin, Alexander (Sasha Levin)
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
Myungho Jung, David S . Miller
On Mon, Sep 18, 2017 at 12:19:36AM +0000, Levin, Alexander (Sasha Levin) wrote:
> From: Myungho Jung <mhjungk@gmail.com>
>
> [ Upstream commit 9899886d5e8ec5b343b1efe44f185a0e68dc6454 ]
>
> Added NULL check to make __dev_kfree_skb_irq consistent with kfree
> family of functions.
>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=195289
>
> Signed-off-by: Myungho Jung <mhjungk@gmail.com>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Is this a different series from your original XX/59 patch series that
you feel is ready to go into the stable tree, or are you still asking
for review for these before they get submitted?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 20+ messages in thread* Re: [PATCH for 4.9 01/39] net: core: Prevent from dereferencing null pointer when releasing SKB
2017-09-18 6:41 ` [PATCH for 4.9 01/39] net: core: Prevent from dereferencing null pointer when releasing SKB Greg KH
@ 2017-09-18 14:13 ` Levin, Alexander (Sasha Levin)
2017-09-18 14:31 ` Levin, Alexander (Sasha Levin)
0 siblings, 1 reply; 20+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-09-18 14:13 UTC (permalink / raw)
To: Greg KH
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
Myungho Jung, David S . Miller
On Mon, Sep 18, 2017 at 08:41:02AM +0200, Greg KH wrote:
>On Mon, Sep 18, 2017 at 12:19:36AM +0000, Levin, Alexander (Sasha Levin) wrote:
>> From: Myungho Jung <mhjungk@gmail.com>
>>
>> [ Upstream commit 9899886d5e8ec5b343b1efe44f185a0e68dc6454 ]
>>
>> Added NULL check to make __dev_kfree_skb_irq consistent with kfree
>> family of functions.
>>
>> Link: https://urldefense.proofpoint.com/v2/url?u=https-3A__bugzilla.kernel.org_show-5Fbug.cgi-3Fid-3D195289&d=DwIBAg&c=udBTRvFvXC5Dhqg7UHpJlPps3mZ3LRxpb6__0PomBTQ&r=bUtaaC9mlBij4OjEG_D-KPul_335azYzfC4Rjgomobo&m=iXzciSQOaZF7sggj-m_1eQCbmqf43dsIy8ogFRdIvSE&s=kZBpt2uE3l0TtR50y0QmqJyb1Wp3A-FB-GVfkwnTgVI&e=
>>
>> Signed-off-by: Myungho Jung <mhjungk@gmail.com>
>> Signed-off-by: David S. Miller <davem@davemloft.net>
>> Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
>
>Is this a different series from your original XX/59 patch series that
>you feel is ready to go into the stable tree, or are you still asking
>for review for these before they get submitted?
This is a different series. Figured I'd do 2-3 in parallel to speed up things.
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH for 4.9 01/39] net: core: Prevent from dereferencing null pointer when releasing SKB
2017-09-18 14:13 ` Levin, Alexander (Sasha Levin)
@ 2017-09-18 14:31 ` Levin, Alexander (Sasha Levin)
0 siblings, 0 replies; 20+ messages in thread
From: Levin, Alexander (Sasha Levin) @ 2017-09-18 14:31 UTC (permalink / raw)
To: Greg KH
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
Myungho Jung, David S . Miller
On Mon, Sep 18, 2017 at 10:13:21AM -0400, Sasha Levin wrote:
>On Mon, Sep 18, 2017 at 08:41:02AM +0200, Greg KH wrote:
>>On Mon, Sep 18, 2017 at 12:19:36AM +0000, Levin, Alexander (Sasha Levin) wrote:
>>>From: Myungho Jung <mhjungk@gmail.com>
>>>
>>>[ Upstream commit 9899886d5e8ec5b343b1efe44f185a0e68dc6454 ]
>>>
>>>Added NULL check to make __dev_kfree_skb_irq consistent with kfree
>>>family of functions.
>>>
>>>Link: https://urldefense.proofpoint.com/v2/url?u=https-3A__bugzilla.kernel.org_show-5Fbug.cgi-3Fid-3D195289&d=DwIBAg&c=udBTRvFvXC5Dhqg7UHpJlPps3mZ3LRxpb6__0PomBTQ&r=bUtaaC9mlBij4OjEG_D-KPul_335azYzfC4Rjgomobo&m=iXzciSQOaZF7sggj-m_1eQCbmqf43dsIy8ogFRdIvSE&s=kZBpt2uE3l0TtR50y0QmqJyb1Wp3A-FB-GVfkwnTgVI&e=
>>>
>>>Signed-off-by: Myungho Jung <mhjungk@gmail.com>
>>>Signed-off-by: David S. Miller <davem@davemloft.net>
>>>Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
>>
>>Is this a different series from your original XX/59 patch series that
>>you feel is ready to go into the stable tree, or are you still asking
>>for review for these before they get submitted?
>
>This is a different series. Figured I'd do 2-3 in parallel to speed up things.
Sorry, just to clarify, I'm waiting for reviews on this one.
I'll improve the patch subject prefix next time to clearify that.
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 20+ messages in thread