* [PATCH 4.9] mlxsw: spectrum: Forbid linking of VLAN devices to devices that have uppers
@ 2018-07-05 17:24 Ido Schimmel
2018-07-05 17:52 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Ido Schimmel @ 2018-07-05 17:24 UTC (permalink / raw)
To: stable; +Cc: gregkh, jslaby, davem, jiri, Ido Schimmel
commit 25cc72a33835ed8a6f53180a822cadab855852ac upstream.
Jiri Slaby noticed that the backport of upstream commit 25cc72a33835
("mlxsw: spectrum: Forbid linking to devices that have uppers") to
kernel 4.9.y introduced the same check twice in the same function
instead of in two different places.
Fix this by relocating one of the checks to its intended place, thus
preventing unsupported configurations as described in the original
commit.
Fixes: 73ee5a73e75f ("mlxsw: spectrum: Forbid linking to devices that have uppers")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reported-by: Jiri Slaby <jslaby@suse.cz>
---
Greg, I read Documentation/stable_kernel_rules.txt, so I hope the patch
is fine. Please let me know if v2 is required. Thanks
---
drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
index d50350c7adc4..22a5916e477e 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
@@ -4187,10 +4187,6 @@ static int mlxsw_sp_netdevice_port_upper_event(struct net_device *dev,
if (netif_is_lag_port(dev) && is_vlan_dev(upper_dev) &&
!netif_is_lag_master(vlan_dev_real_dev(upper_dev)))
return -EINVAL;
- if (!info->linking)
- break;
- if (netdev_has_any_upper_dev(upper_dev))
- return -EINVAL;
break;
case NETDEV_CHANGEUPPER:
upper_dev = info->upper_dev;
@@ -4566,6 +4562,8 @@ static int mlxsw_sp_netdevice_vport_event(struct net_device *dev,
return -EINVAL;
if (!info->linking)
break;
+ if (netdev_has_any_upper_dev(upper_dev))
+ return -EINVAL;
/* We can't have multiple VLAN interfaces configured on
* the same port and being members in the same bridge.
*/
--
2.14.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 4.9] mlxsw: spectrum: Forbid linking of VLAN devices to devices that have uppers
2018-07-05 17:24 [PATCH 4.9] mlxsw: spectrum: Forbid linking of VLAN devices to devices that have uppers Ido Schimmel
@ 2018-07-05 17:52 ` Greg KH
2018-07-05 18:23 ` Ido Schimmel
0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2018-07-05 17:52 UTC (permalink / raw)
To: Ido Schimmel; +Cc: stable, jslaby, davem, jiri
On Thu, Jul 05, 2018 at 08:24:52PM +0300, Ido Schimmel wrote:
> commit 25cc72a33835ed8a6f53180a822cadab855852ac upstream.
>
> Jiri Slaby noticed that the backport of upstream commit 25cc72a33835
> ("mlxsw: spectrum: Forbid linking to devices that have uppers") to
> kernel 4.9.y introduced the same check twice in the same function
> instead of in two different places.
>
> Fix this by relocating one of the checks to its intended place, thus
> preventing unsupported configurations as described in the original
> commit.
>
> Fixes: 73ee5a73e75f ("mlxsw: spectrum: Forbid linking to devices that have uppers")
> Signed-off-by: Ido Schimmel <idosch@mellanox.com>
> Reported-by: Jiri Slaby <jslaby@suse.cz>
> ---
> Greg, I read Documentation/stable_kernel_rules.txt, so I hope the patch
> is fine. Please let me know if v2 is required. Thanks
This commit is already in 4.9.51, why do you need/want it applied again?
confused,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 4.9] mlxsw: spectrum: Forbid linking of VLAN devices to devices that have uppers
2018-07-05 17:52 ` Greg KH
@ 2018-07-05 18:23 ` Ido Schimmel
2018-07-05 18:29 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Ido Schimmel @ 2018-07-05 18:23 UTC (permalink / raw)
To: Greg KH; +Cc: stable, jslaby, davem, jiri
On Thu, Jul 05, 2018 at 07:52:21PM +0200, Greg KH wrote:
> On Thu, Jul 05, 2018 at 08:24:52PM +0300, Ido Schimmel wrote:
> > commit 25cc72a33835ed8a6f53180a822cadab855852ac upstream.
> >
> > Jiri Slaby noticed that the backport of upstream commit 25cc72a33835
> > ("mlxsw: spectrum: Forbid linking to devices that have uppers") to
> > kernel 4.9.y introduced the same check twice in the same function
> > instead of in two different places.
> >
> > Fix this by relocating one of the checks to its intended place, thus
> > preventing unsupported configurations as described in the original
> > commit.
> >
> > Fixes: 73ee5a73e75f ("mlxsw: spectrum: Forbid linking to devices that have uppers")
> > Signed-off-by: Ido Schimmel <idosch@mellanox.com>
> > Reported-by: Jiri Slaby <jslaby@suse.cz>
> > ---
> > Greg, I read Documentation/stable_kernel_rules.txt, so I hope the patch
> > is fine. Please let me know if v2 is required. Thanks
>
> This commit is already in 4.9.51, why do you need/want it applied again?
It wasn't clear to me if I need to specify "commit <sha1> upstream" also
for fixes of backports. You want me to post v2 without this line?
Thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 4.9] mlxsw: spectrum: Forbid linking of VLAN devices to devices that have uppers
2018-07-05 18:23 ` Ido Schimmel
@ 2018-07-05 18:29 ` Greg KH
2018-07-05 18:43 ` Ido Schimmel
0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2018-07-05 18:29 UTC (permalink / raw)
To: Ido Schimmel; +Cc: stable, jslaby, davem, jiri
On Thu, Jul 05, 2018 at 09:23:47PM +0300, Ido Schimmel wrote:
> On Thu, Jul 05, 2018 at 07:52:21PM +0200, Greg KH wrote:
> > On Thu, Jul 05, 2018 at 08:24:52PM +0300, Ido Schimmel wrote:
> > > commit 25cc72a33835ed8a6f53180a822cadab855852ac upstream.
> > >
> > > Jiri Slaby noticed that the backport of upstream commit 25cc72a33835
> > > ("mlxsw: spectrum: Forbid linking to devices that have uppers") to
> > > kernel 4.9.y introduced the same check twice in the same function
> > > instead of in two different places.
> > >
> > > Fix this by relocating one of the checks to its intended place, thus
> > > preventing unsupported configurations as described in the original
> > > commit.
> > >
> > > Fixes: 73ee5a73e75f ("mlxsw: spectrum: Forbid linking to devices that have uppers")
> > > Signed-off-by: Ido Schimmel <idosch@mellanox.com>
> > > Reported-by: Jiri Slaby <jslaby@suse.cz>
> > > ---
> > > Greg, I read Documentation/stable_kernel_rules.txt, so I hope the patch
> > > is fine. Please let me know if v2 is required. Thanks
> >
> > This commit is already in 4.9.51, why do you need/want it applied again?
>
> It wasn't clear to me if I need to specify "commit <sha1> upstream" also
> for fixes of backports. You want me to post v2 without this line?
I have no idea what you are trying to say here, sorry. This commit is
already in the 4.9.51 kernel release, and yet you are asking for me to
include it again in the 4.9.y tree? Why?
If not, what exactly are you wanting me to do here?
totally confused,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 4.9] mlxsw: spectrum: Forbid linking of VLAN devices to devices that have uppers
2018-07-05 18:29 ` Greg KH
@ 2018-07-05 18:43 ` Ido Schimmel
0 siblings, 0 replies; 5+ messages in thread
From: Ido Schimmel @ 2018-07-05 18:43 UTC (permalink / raw)
To: Greg KH; +Cc: stable, jslaby, davem, jiri
On Thu, Jul 05, 2018 at 08:29:56PM +0200, Greg KH wrote:
> On Thu, Jul 05, 2018 at 09:23:47PM +0300, Ido Schimmel wrote:
> > On Thu, Jul 05, 2018 at 07:52:21PM +0200, Greg KH wrote:
> > > On Thu, Jul 05, 2018 at 08:24:52PM +0300, Ido Schimmel wrote:
> > > > commit 25cc72a33835ed8a6f53180a822cadab855852ac upstream.
> > > >
> > > > Jiri Slaby noticed that the backport of upstream commit 25cc72a33835
> > > > ("mlxsw: spectrum: Forbid linking to devices that have uppers") to
> > > > kernel 4.9.y introduced the same check twice in the same function
> > > > instead of in two different places.
> > > >
> > > > Fix this by relocating one of the checks to its intended place, thus
> > > > preventing unsupported configurations as described in the original
> > > > commit.
> > > >
> > > > Fixes: 73ee5a73e75f ("mlxsw: spectrum: Forbid linking to devices that have uppers")
> > > > Signed-off-by: Ido Schimmel <idosch@mellanox.com>
> > > > Reported-by: Jiri Slaby <jslaby@suse.cz>
> > > > ---
> > > > Greg, I read Documentation/stable_kernel_rules.txt, so I hope the patch
> > > > is fine. Please let me know if v2 is required. Thanks
> > >
> > > This commit is already in 4.9.51, why do you need/want it applied again?
> >
> > It wasn't clear to me if I need to specify "commit <sha1> upstream" also
> > for fixes of backports. You want me to post v2 without this line?
>
> I have no idea what you are trying to say here, sorry. This commit is
> already in the 4.9.51 kernel release, and yet you are asking for me to
> include it again in the 4.9.y tree? Why?
I'm not.
> If not, what exactly are you wanting me to do here?
1. Upstream commit 25cc72a33835 was backported to 4.9.y in 73ee5a73e75f
2. The backport includes a bug spotted by Jiri Slaby
3. The patch I submitted tries to fix this bug in 4.9.y
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-07-05 18:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-05 17:24 [PATCH 4.9] mlxsw: spectrum: Forbid linking of VLAN devices to devices that have uppers Ido Schimmel
2018-07-05 17:52 ` Greg KH
2018-07-05 18:23 ` Ido Schimmel
2018-07-05 18:29 ` Greg KH
2018-07-05 18:43 ` Ido Schimmel
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).