netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 4.4 01/12] bnxt_en: reinitialize IRQs when MTU is modified
@ 2020-03-18 20:56 Sasha Levin
  2020-03-18 20:56 ` [PATCH AUTOSEL 4.4 03/12] fib: add missing attribute validation for tun_id Sasha Levin
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Sasha Levin @ 2020-03-18 20:56 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Vasundhara Volam, Michael Chan, David S . Miller, Sasha Levin,
	netdev

From: Vasundhara Volam <vasundhara-v.volam@broadcom.com>

[ Upstream commit a9b952d267e59a3b405e644930f46d252cea7122 ]

MTU changes may affect the number of IRQs so we must call
bnxt_close_nic()/bnxt_open_nic() with the irq_re_init parameter
set to true.  The reason is that a larger MTU may require
aggregation rings not needed with smaller MTU.  We may not be
able to allocate the required number of aggregation rings and
so we reduce the number of channels which will change the number
of IRQs.  Without this patch, it may crash eventually in
pci_disable_msix() when the IRQs are not properly unwound.

Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.")
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 81282b811a6cd..d91953eabfeb4 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -5310,13 +5310,13 @@ static int bnxt_change_mtu(struct net_device *dev, int new_mtu)
 		return -EINVAL;
 
 	if (netif_running(dev))
-		bnxt_close_nic(bp, false, false);
+		bnxt_close_nic(bp, true, false);
 
 	dev->mtu = new_mtu;
 	bnxt_set_ring_params(bp);
 
 	if (netif_running(dev))
-		return bnxt_open_nic(bp, false, false);
+		return bnxt_open_nic(bp, true, false);
 
 	return 0;
 }
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH AUTOSEL 4.4 03/12] fib: add missing attribute validation for tun_id
  2020-03-18 20:56 [PATCH AUTOSEL 4.4 01/12] bnxt_en: reinitialize IRQs when MTU is modified Sasha Levin
@ 2020-03-18 20:56 ` Sasha Levin
  2020-03-18 20:56 ` [PATCH AUTOSEL 4.4 04/12] team: add missing attribute validation for port ifindex Sasha Levin
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Sasha Levin @ 2020-03-18 20:56 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Jakub Kicinski, David Ahern, David S . Miller, Sasha Levin,
	netdev

From: Jakub Kicinski <kuba@kernel.org>

[ Upstream commit 4c16d64ea04056f1b1b324ab6916019f6a064114 ]

Add missing netlink policy entry for FRA_TUN_ID.

Fixes: e7030878fc84 ("fib: Add fib rule match on tunnel id")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 include/net/fib_rules.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h
index 59160de702b68..99ae8ac65ecad 100644
--- a/include/net/fib_rules.h
+++ b/include/net/fib_rules.h
@@ -85,6 +85,7 @@ struct fib_rules_ops {
 	[FRA_OIFNAME]	= { .type = NLA_STRING, .len = IFNAMSIZ - 1 }, \
 	[FRA_PRIORITY]	= { .type = NLA_U32 }, \
 	[FRA_FWMARK]	= { .type = NLA_U32 }, \
+	[FRA_TUN_ID]	= { .type = NLA_U64 }, \
 	[FRA_FWMASK]	= { .type = NLA_U32 }, \
 	[FRA_TABLE]     = { .type = NLA_U32 }, \
 	[FRA_SUPPRESS_PREFIXLEN] = { .type = NLA_U32 }, \
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH AUTOSEL 4.4 04/12] team: add missing attribute validation for port ifindex
  2020-03-18 20:56 [PATCH AUTOSEL 4.4 01/12] bnxt_en: reinitialize IRQs when MTU is modified Sasha Levin
  2020-03-18 20:56 ` [PATCH AUTOSEL 4.4 03/12] fib: add missing attribute validation for tun_id Sasha Levin
@ 2020-03-18 20:56 ` Sasha Levin
  2020-03-18 20:56 ` [PATCH AUTOSEL 4.4 05/12] team: add missing attribute validation for array index Sasha Levin
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Sasha Levin @ 2020-03-18 20:56 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Jakub Kicinski, Jiri Pirko, David S . Miller, Sasha Levin, netdev

From: Jakub Kicinski <kuba@kernel.org>

[ Upstream commit dd25cb272ccce4db67dc8509278229099e4f5e99 ]

Add missing attribute validation for TEAM_ATTR_OPTION_PORT_IFINDEX
to the netlink policy.

Fixes: 80f7c6683fe0 ("team: add support for per-port options")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/team/team.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 285d376f53efa..adafc570c6507 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -2169,6 +2169,7 @@ team_nl_option_policy[TEAM_ATTR_OPTION_MAX + 1] = {
 	[TEAM_ATTR_OPTION_CHANGED]		= { .type = NLA_FLAG },
 	[TEAM_ATTR_OPTION_TYPE]			= { .type = NLA_U8 },
 	[TEAM_ATTR_OPTION_DATA]			= { .type = NLA_BINARY },
+	[TEAM_ATTR_OPTION_PORT_IFINDEX]		= { .type = NLA_U32 },
 };
 
 static int team_nl_cmd_noop(struct sk_buff *skb, struct genl_info *info)
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH AUTOSEL 4.4 05/12] team: add missing attribute validation for array index
  2020-03-18 20:56 [PATCH AUTOSEL 4.4 01/12] bnxt_en: reinitialize IRQs when MTU is modified Sasha Levin
  2020-03-18 20:56 ` [PATCH AUTOSEL 4.4 03/12] fib: add missing attribute validation for tun_id Sasha Levin
  2020-03-18 20:56 ` [PATCH AUTOSEL 4.4 04/12] team: add missing attribute validation for port ifindex Sasha Levin
@ 2020-03-18 20:56 ` Sasha Levin
  2020-03-18 20:56 ` [PATCH AUTOSEL 4.4 06/12] netfilter: cthelper: add missing attribute validation for cthelper Sasha Levin
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Sasha Levin @ 2020-03-18 20:56 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Jakub Kicinski, Jiri Pirko, David S . Miller, Sasha Levin, netdev

From: Jakub Kicinski <kuba@kernel.org>

[ Upstream commit 669fcd7795900cd1880237cbbb57a7db66cb9ac8 ]

Add missing attribute validation for TEAM_ATTR_OPTION_ARRAY_INDEX
to the netlink policy.

Fixes: b13033262d24 ("team: introduce array options")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/team/team.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index adafc570c6507..e51fb7cb77282 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -2170,6 +2170,7 @@ team_nl_option_policy[TEAM_ATTR_OPTION_MAX + 1] = {
 	[TEAM_ATTR_OPTION_TYPE]			= { .type = NLA_U8 },
 	[TEAM_ATTR_OPTION_DATA]			= { .type = NLA_BINARY },
 	[TEAM_ATTR_OPTION_PORT_IFINDEX]		= { .type = NLA_U32 },
+	[TEAM_ATTR_OPTION_ARRAY_INDEX]		= { .type = NLA_U32 },
 };
 
 static int team_nl_cmd_noop(struct sk_buff *skb, struct genl_info *info)
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH AUTOSEL 4.4 06/12] netfilter: cthelper: add missing attribute validation for cthelper
  2020-03-18 20:56 [PATCH AUTOSEL 4.4 01/12] bnxt_en: reinitialize IRQs when MTU is modified Sasha Levin
                   ` (2 preceding siblings ...)
  2020-03-18 20:56 ` [PATCH AUTOSEL 4.4 05/12] team: add missing attribute validation for array index Sasha Levin
@ 2020-03-18 20:56 ` Sasha Levin
  2020-03-18 20:56 ` [PATCH AUTOSEL 4.4 09/12] mac80211: Do not send mesh HWMP PREQ if HWMP is disabled Sasha Levin
  2020-03-18 20:56 ` [PATCH AUTOSEL 4.4 10/12] sxgbe: Fix off by one in samsung driver strncpy size arg Sasha Levin
  5 siblings, 0 replies; 7+ messages in thread
From: Sasha Levin @ 2020-03-18 20:56 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Jakub Kicinski, Pablo Neira Ayuso, Sasha Levin, netfilter-devel,
	coreteam, netdev

From: Jakub Kicinski <kuba@kernel.org>

[ Upstream commit c049b3450072b8e3998053490e025839fecfef31 ]

Add missing attribute validation for cthelper
to the netlink policy.

Fixes: 12f7a505331e ("netfilter: add user-space connection tracking helper infrastructure")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/netfilter/nfnetlink_cthelper.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/netfilter/nfnetlink_cthelper.c b/net/netfilter/nfnetlink_cthelper.c
index ac143ae4f7b65..8c17338693432 100644
--- a/net/netfilter/nfnetlink_cthelper.c
+++ b/net/netfilter/nfnetlink_cthelper.c
@@ -711,6 +711,8 @@ static const struct nla_policy nfnl_cthelper_policy[NFCTH_MAX+1] = {
 	[NFCTH_NAME] = { .type = NLA_NUL_STRING,
 			 .len = NF_CT_HELPER_NAME_LEN-1 },
 	[NFCTH_QUEUE_NUM] = { .type = NLA_U32, },
+	[NFCTH_PRIV_DATA_LEN] = { .type = NLA_U32, },
+	[NFCTH_STATUS] = { .type = NLA_U32, },
 };
 
 static const struct nfnl_callback nfnl_cthelper_cb[NFNL_MSG_CTHELPER_MAX] = {
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH AUTOSEL 4.4 09/12] mac80211: Do not send mesh HWMP PREQ if HWMP is disabled
  2020-03-18 20:56 [PATCH AUTOSEL 4.4 01/12] bnxt_en: reinitialize IRQs when MTU is modified Sasha Levin
                   ` (3 preceding siblings ...)
  2020-03-18 20:56 ` [PATCH AUTOSEL 4.4 06/12] netfilter: cthelper: add missing attribute validation for cthelper Sasha Levin
@ 2020-03-18 20:56 ` Sasha Levin
  2020-03-18 20:56 ` [PATCH AUTOSEL 4.4 10/12] sxgbe: Fix off by one in samsung driver strncpy size arg Sasha Levin
  5 siblings, 0 replies; 7+ messages in thread
From: Sasha Levin @ 2020-03-18 20:56 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Nicolas Cavallari, Johannes Berg, Sasha Levin, linux-wireless,
	netdev

From: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>

[ Upstream commit ba32679cac50c38fdf488296f96b1f3175532b8e ]

When trying to transmit to an unknown destination, the mesh code would
unconditionally transmit a HWMP PREQ even if HWMP is not the current
path selection algorithm.

Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
Link: https://lore.kernel.org/r/20200305140409.12204-1-cavallar@lri.fr
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/mac80211/mesh_hwmp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index 466922f09d048..43edcba6d67b7 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -1112,7 +1112,8 @@ int mesh_nexthop_resolve(struct ieee80211_sub_if_data *sdata,
 		}
 	}
 
-	if (!(mpath->flags & MESH_PATH_RESOLVING))
+	if (!(mpath->flags & MESH_PATH_RESOLVING) &&
+	    mesh_path_sel_is_hwmp(sdata))
 		mesh_queue_preq(mpath, PREQ_Q_F_START);
 
 	if (skb_queue_len(&mpath->frame_queue) >= MESH_FRAME_QUEUE_LEN)
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH AUTOSEL 4.4 10/12] sxgbe: Fix off by one in samsung driver strncpy size arg
  2020-03-18 20:56 [PATCH AUTOSEL 4.4 01/12] bnxt_en: reinitialize IRQs when MTU is modified Sasha Levin
                   ` (4 preceding siblings ...)
  2020-03-18 20:56 ` [PATCH AUTOSEL 4.4 09/12] mac80211: Do not send mesh HWMP PREQ if HWMP is disabled Sasha Levin
@ 2020-03-18 20:56 ` Sasha Levin
  5 siblings, 0 replies; 7+ messages in thread
From: Sasha Levin @ 2020-03-18 20:56 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Dominik Czarnota, David S . Miller, Sasha Levin, netdev

From: Dominik Czarnota <dominik.b.czarnota@gmail.com>

[ Upstream commit f3cc008bf6d59b8d93b4190e01d3e557b0040e15 ]

This patch fixes an off-by-one error in strncpy size argument in
drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c. The issue is that in:

        strncmp(opt, "eee_timer:", 6)

the passed string literal: "eee_timer:" has 10 bytes (without the NULL
byte) and the passed size argument is 6. As a result, the logic will
also accept other, malformed strings, e.g. "eee_tiXXX:".

This bug doesn't seem to have any security impact since its present in
module's cmdline parsing code.

Signed-off-by: Dominik Czarnota <dominik.b.czarnota@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c b/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c
index 413ea14ab91f7..56cdc01c58477 100644
--- a/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c
+++ b/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c
@@ -2315,7 +2315,7 @@ static int __init sxgbe_cmdline_opt(char *str)
 	if (!str || !*str)
 		return -EINVAL;
 	while ((opt = strsep(&str, ",")) != NULL) {
-		if (!strncmp(opt, "eee_timer:", 6)) {
+		if (!strncmp(opt, "eee_timer:", 10)) {
 			if (kstrtoint(opt + 10, 0, &eee_timer))
 				goto err;
 		}
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-03-18 20:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-18 20:56 [PATCH AUTOSEL 4.4 01/12] bnxt_en: reinitialize IRQs when MTU is modified Sasha Levin
2020-03-18 20:56 ` [PATCH AUTOSEL 4.4 03/12] fib: add missing attribute validation for tun_id Sasha Levin
2020-03-18 20:56 ` [PATCH AUTOSEL 4.4 04/12] team: add missing attribute validation for port ifindex Sasha Levin
2020-03-18 20:56 ` [PATCH AUTOSEL 4.4 05/12] team: add missing attribute validation for array index Sasha Levin
2020-03-18 20:56 ` [PATCH AUTOSEL 4.4 06/12] netfilter: cthelper: add missing attribute validation for cthelper Sasha Levin
2020-03-18 20:56 ` [PATCH AUTOSEL 4.4 09/12] mac80211: Do not send mesh HWMP PREQ if HWMP is disabled Sasha Levin
2020-03-18 20:56 ` [PATCH AUTOSEL 4.4 10/12] sxgbe: Fix off by one in samsung driver strncpy size arg Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).