From: Andrew Lunn
Date: Sun, 11 Dec 2016 21:07:19 +0100
> A port is not necessarily assigned to a netdev. And a port does not
> need to be a member of a bridge. So when iterating over all ports,
> check before using the netdev and bridge_dev for a port. Otherwise we
> dereference a NULL pointer.
Hi Andrew,
Andrew Lunn writes:
> A port is not necessarily assigned to a netdev. And a port does not
> need to be a member of a bridge. So when iterating over all ports,
> check before using the netdev and bridge_dev for a port. Otherwise we
> dereference a NULL pointer.
>
> Fixes: da9c359e19f0
On Sun, Dec 11, 2016 at 04:02:37PM -0500, Vivien Didelot wrote:
> Hi Andrew,
>
> Andrew Lunn writes:
>
> > @@ -1804,6 +1807,9 @@ static int mv88e6xxx_port_check_hw_vlan(struct
> > dsa_switch *ds, int port,
> > chip->ports[port].bridge_dev)
> >
Hi Andrew,
Andrew Lunn writes:
> @@ -1804,6 +1807,9 @@ static int mv88e6xxx_port_check_hw_vlan(struct
> dsa_switch *ds, int port,
> chip->ports[port].bridge_dev)
> break; /* same bridge, check next VLAN */
>
> + if (!
A port is not necessarily assigned to a netdev. And a port does not
need to be a member of a bridge. So when iterating over all ports,
check before using the netdev and bridge_dev for a port. Otherwise we
dereference a NULL pointer.
Fixes: da9c359e19f0 ("net: dsa: mv88e6xxx: check hardware VLAN in