[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180528121644.4wftwxql43eoug5h@mwanda>
Date: Mon, 28 May 2018 15:16:45 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
"David S. Miller" <davem@...emloft.net>,
Sasha Levin <alexander.levin@...rosoft.com>
Subject: Re: [PATCH 4.14 286/496] macsec: missing dev_put() on error in
macsec_newlink()
Hi Greg,
I'm sorryt. This one was buggy. We did a revert of it in commit
bd28899dd34f ("Revert "macsec: missing dev_put() on error in
macsec_newlink()"").
You have queued for 4.8 as well.
regards,
dan carpenter
On Mon, May 28, 2018 at 12:01:11PM +0200, Greg Kroah-Hartman wrote:
> 4.14-stable review patch. If anyone has any objections, please let me know.
>
> ------------------
>
> From: Dan Carpenter <dan.carpenter@...cle.com>
>
> [ Upstream commit 5dcd8400884cc4a043a6d4617e042489e5d566a9 ]
>
> We moved the dev_hold(real_dev); call earlier in the function but forgot
> to update the error paths.
>
> Fixes: 0759e552bce7 ("macsec: fix negative refcnt on parent link")
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
> Signed-off-by: David S. Miller <davem@...emloft.net>
> Signed-off-by: Sasha Levin <alexander.levin@...rosoft.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> ---
> drivers/net/macsec.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> --- a/drivers/net/macsec.c
> +++ b/drivers/net/macsec.c
> @@ -3248,7 +3248,7 @@ static int macsec_newlink(struct net *ne
>
> err = netdev_upper_dev_link(real_dev, dev);
> if (err < 0)
> - goto unregister;
> + goto put_dev;
>
> /* need to be already registered so that ->init has run and
> * the MAC addr is set
> @@ -3284,7 +3284,8 @@ del_dev:
> macsec_del_dev(macsec);
> unlink:
> netdev_upper_dev_unlink(real_dev, dev);
> -unregister:
> +put_dev:
> + dev_put(real_dev);
> unregister_netdevice(dev);
> return err;
> }
>
Powered by blists - more mailing lists