Message ID | 1438536556-13154-1-git-send-email-jiri@resnulli.us |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
On Sun, Aug 2, 2015 at 10:29 AM, Jiri Pirko <jiri@resnulli.us> wrote: > From: Ido Schimmel <idosch@mellanox.com> > > When removing a port's netdevice in 'rocker_remove_ports', we should > also free the allocated 'net_device' structure. Do that by calling > 'free_netdev' after unregistering it. > > Signed-off-by: Ido Schimmel <idosch@mellanox.com> > Signed-off-by: Jiri Pirko <jiri@resnulli.us> > Fixes: 4b8ac9660af ("rocker: introduce rocker switch driver") Acked-by: Scott Feldman <sfeldma@gmail.com> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Jiri Pirko <jiri@resnulli.us> Date: Sun, 2 Aug 2015 19:29:16 +0200 > From: Ido Schimmel <idosch@mellanox.com> > > When removing a port's netdevice in 'rocker_remove_ports', we should > also free the allocated 'net_device' structure. Do that by calling > 'free_netdev' after unregistering it. > > Signed-off-by: Ido Schimmel <idosch@mellanox.com> > Signed-off-by: Jiri Pirko <jiri@resnulli.us> > Fixes: 4b8ac9660af ("rocker: introduce rocker switch driver") Applied and queued up for -stable, thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c index 7b4c347..1d0f140 100644 --- a/drivers/net/ethernet/rocker/rocker.c +++ b/drivers/net/ethernet/rocker/rocker.c @@ -4923,6 +4923,7 @@ static void rocker_remove_ports(const struct rocker *rocker) rocker_port_ig_tbl(rocker_port, SWITCHDEV_TRANS_NONE, ROCKER_OP_FLAG_REMOVE); unregister_netdev(rocker_port->dev); + free_netdev(rocker_port->dev); } kfree(rocker->ports); }