Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2280089imm; Mon, 28 May 2018 05:18:01 -0700 (PDT) X-Google-Smtp-Source: AB8JxZog9A8mLon73lOOOucExjgit144h1U22hIlWgBlUGVv5lcUL7nX/t3tk2ew569cDkzEmELs X-Received: by 2002:a17:902:a586:: with SMTP id az6-v6mr13541990plb.210.1527509881045; Mon, 28 May 2018 05:18:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527509881; cv=none; d=google.com; s=arc-20160816; b=GNS95Wm+t/CUX3XbBiQaLg00Szv60LyQjwzLp2nUnCTwHwamwScuchV3Nl6Pp597Yy gxl75BcM7QJ+Or6teiKQXcYFMkwdfLSbPuvIBDeduTeWmzXi+QwIoirGOIsI+MP2kzdE oD/5uJX6JO8xkyWuMXLJvXsBTvzVh3wlS2LJ3lzirKp0TXWONhmjK4FuMl2Xl5RmnPR0 O/Mbg50N6BsZHCkT04m5SbtXGVBxzx3BI2ht2d1PVUT0/zVVDggAoifi/X4KPW+3gpQ7 yl68n8HR0sDdOLpbsrZOAxd6seUtK8Fx1vMsdU8JFmsR426b2U8cs/JsOUv3AlC0lGmt 2N9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=UbiULfpLe9Wrj/bRpdzme+NL15zYEpcX09qfn6ZjJQI=; b=NWmpkPiPnomfrLVPXpBb9IEpxPBBraD/v8gRla5udg2AokOUQnd1OchIoKWR9i1eiu RTb92hITRk7GG0+vI6jROL8d07GZEZIdbZuvcEROpD47eDwnfVGR0Spf6/LKPURwfPac aax8Il8s6i9ORUxajTrcQqvZfgFwFa3vOHkZciYrOOBWfE4mSaBFhiTiN+QM8WylsVvf eM+o7Ri9Yfwa4UlwTH3g6VJDsXfoLE/WyFaxFRYN/rBdAVl/WaoqSdzAnjdrO4TZkzmC ZFwvGxql3YqPN+iFzqvYlSxE9Gog6Y/Huved0nm13aZDuD3Qyd1xKJCxMggNcI9odNfl +IMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=FZneDQNq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x14-v6si3901467pll.37.2018.05.28.05.17.46; Mon, 28 May 2018 05:18:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=FZneDQNq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423475AbeE1MRI (ORCPT + 99 others); Mon, 28 May 2018 08:17:08 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:50348 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422783AbeE1MRA (ORCPT ); Mon, 28 May 2018 08:17:00 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w4SCFijI158623; Mon, 28 May 2018 12:16:54 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2017-10-26; bh=UbiULfpLe9Wrj/bRpdzme+NL15zYEpcX09qfn6ZjJQI=; b=FZneDQNqm7oGDapIL5ulMtd63jUD7ghn1JcQXLrrZ+XxVfYTTH66WkUIhir2pK0DhWRw jVP03QVWlJdRUlCX6M3mDk7juZYW03dvtM6q3iYzlPDh5QQZnCyXESPtRGA+1wMaliVr 5T79LbxlNu9GbR++89Tz5ErL/M6xo/RQcVQqBvtM3OKDF7Sh36J9OIcItbfbD8n59wp7 69sCiVnuLiyoh4o/byclWLCZvBFz0uxyPHmiZ9pmovDhZPH9i/LSQEtlt4+AR4+KYUUj J1ZX6T3u6pAfO1WBaLieNANOpMh1rhlVtO3VQaMpSx/VN7pYXY45LFWdRxMMbBCMCAv8 1g== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2120.oracle.com with ESMTP id 2j6yjbd6w3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 28 May 2018 12:16:54 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w4SCGrk1004765 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 28 May 2018 12:16:53 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w4SCGqiK001016; Mon, 28 May 2018 12:16:53 GMT Received: from mwanda (/41.202.241.18) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 28 May 2018 05:16:52 -0700 Date: Mon, 28 May 2018 15:16:45 +0300 From: Dan Carpenter To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, "David S. Miller" , Sasha Levin Subject: Re: [PATCH 4.14 286/496] macsec: missing dev_put() on error in macsec_newlink() Message-ID: <20180528121644.4wftwxql43eoug5h@mwanda> References: <20180528100319.498712256@linuxfoundation.org> <20180528100331.887783491@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180528100331.887783491@linuxfoundation.org> User-Agent: NeoMutt/20170609 (1.8.3) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8906 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1805280150 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > [ 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 > Signed-off-by: David S. Miller > Signed-off-by: Sasha Levin > Signed-off-by: Greg Kroah-Hartman > --- > 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; > } >