Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1806144imm; Wed, 16 May 2018 03:25:35 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr+H0eiTICw74NMp5/zQpdHaeIj+UxX1XZaPbVDiYx3zhh0+T6pqb+tkOR5NUF7IOy21Ak3 X-Received: by 2002:a17:902:341:: with SMTP id 59-v6mr325739pld.324.1526466334987; Wed, 16 May 2018 03:25:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526466334; cv=none; d=google.com; s=arc-20160816; b=c8FlLI7RofVKdZzNaRxNQ9CU/Be1ikLgLrZ1FeG9Bub99zNP45RU3vTxg2myvrDGqE W4gxJR4nvghuwLjkQwXeU78nGCyK4AUcD828gKzDrlPa8DWsgEer6sH6qzG40SmOgMlw 7MDR375Igplju5p0C5dk6R1fZOkH1Ml9BfgJzkGFSGsM56V4CWCslxN6HZTr/f0sDRei 3EyouSWZVUYc4nF+YP9IW8UwVApylHDJaoG2QTSCinoK7/bc1gSkwMzsyTZSyJNY2a7e ka1OVPwJBxvF/M05QGwGCVb8tGGETAt5wapoXpDaCV+/Q0wV0ygCMZ7VbcfPLx6E2Xje cGSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=cJes1OhW4NH13lzjMc3PXbipHrYVkpl4//zrNZeV84I=; b=abtpZc+M+MGkFp+/BBh8/tVDa2gqUqDURiQY7SU2SxaFk8Vl/T2kj+yshDFTTraUh5 KulW7nu0PqcyqLeQXMuX+TjrzOSbuQiXIWYEU8ufiIs3nyif3QVHZQX2pj5D9dSmV41s 1gJn1zJIxM0/ydop4NjKzG2XhEv+zdtArWxbU2C60uPGaGoM89Cy3HrYZqkEx+P4+QND O92Jwd9DLw5woeI7+AsVKk7BqyOn8+KiVH4cWvN+XJrWvc8wf0W96Wu/WPUSUBEN+p+e n/bxxQtUSK8JEgkRYzBkCeqTp9QNpLgIq5O3ZrkUwldxt5VsU2apST0ttu6UHKu34GFK E7cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=b5WPNem7; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s88-v6si2306245pfa.339.2018.05.16.03.25.20; Wed, 16 May 2018 03:25:34 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=b5WPNem7; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752498AbeEPJoZ (ORCPT + 99 others); Wed, 16 May 2018 05:44:25 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:46826 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751402AbeEPJoV (ORCPT ); Wed, 16 May 2018 05:44:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=cJes1OhW4NH13lzjMc3PXbipHrYVkpl4//zrNZeV84I=; b=b5WPNem7ESma35Rd37tIqFDLv +CTM7h4zE5eXMcTjt69tZTJ0hznGWaUkNeNl1sfnuI2VDlC++0W+8aOC/s2VTU1RKBWY6RWPj9FQQ pD1eS+R9Wr/Y9T+B4UZ1xvoOyb2mC0A0t+PwH6lIvWWjdPWkyZ+d/9hpe4NYae9VbmOXzCSd8fX6f xxU5PjofMToxY6tRfiLVVyn9WBFIvtYsjYsqPDfu3UfNiEG8pJUVXxtekztvs+83t5q0AZn/fxvAr cZ0/dtbNdxM3o7XCGf/pCx4AnIpWB26WdGarHWpAL/ZzE99HUBZtvAqweFT/bCHH72tSR57mHX7gy Lma5xLCeg==; Received: from 089144199016.atnat0008.highway.a1.net ([89.144.199.16] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fIsyP-0004qq-60; Wed, 16 May 2018 09:43:54 +0000 From: Christoph Hellwig To: Andrew Morton , Alexander Viro Cc: Alexey Dobriyan , Greg Kroah-Hartman , Jiri Slaby , Alessandro Zummo , Alexandre Belloni , linux-acpi@vger.kernel.org, drbd-dev@lists.linbit.com, linux-ide@vger.kernel.org, netdev@vger.kernel.org, linux-rtc@vger.kernel.org, megaraidlinux.pdl@broadcom.com, linux-scsi@vger.kernel.org, devel@driverdev.osuosl.org, linux-afs@lists.infradead.org, linux-ext4@vger.kernel.org, jfs-discussion@lists.sourceforge.net, netfilter-devel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 01/42] net/can: single_open_net needs to be paired with single_release_net Date: Wed, 16 May 2018 11:43:05 +0200 Message-Id: <20180516094346.20506-2-hch@lst.de> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180516094346.20506-1-hch@lst.de> References: <20180516094346.20506-1-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Otherwise we will leak a reference to the network namespace. Signed-off-by: Christoph Hellwig --- net/can/bcm.c | 2 +- net/can/proc.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/net/can/bcm.c b/net/can/bcm.c index ac5e5e34fee3..8073fa14e143 100644 --- a/net/can/bcm.c +++ b/net/can/bcm.c @@ -249,7 +249,7 @@ static const struct file_operations bcm_proc_fops = { .open = bcm_proc_open, .read = seq_read, .llseek = seq_lseek, - .release = single_release, + .release = single_release_net, }; #endif /* CONFIG_PROC_FS */ diff --git a/net/can/proc.c b/net/can/proc.c index fdf704e9bb8c..fde2fd55b826 100644 --- a/net/can/proc.c +++ b/net/can/proc.c @@ -279,7 +279,7 @@ static const struct file_operations can_stats_proc_fops = { .open = can_stats_proc_open, .read = seq_read, .llseek = seq_lseek, - .release = single_release, + .release = single_release_net, }; static int can_reset_stats_proc_show(struct seq_file *m, void *v) @@ -449,7 +449,7 @@ static const struct file_operations can_rcvlist_sff_proc_fops = { .open = can_rcvlist_sff_proc_open, .read = seq_read, .llseek = seq_lseek, - .release = single_release, + .release = single_release_net, }; @@ -492,7 +492,7 @@ static const struct file_operations can_rcvlist_eff_proc_fops = { .open = can_rcvlist_eff_proc_open, .read = seq_read, .llseek = seq_lseek, - .release = single_release, + .release = single_release_net, }; /* -- 2.17.0