Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3306670imu; Sun, 11 Nov 2018 12:03:02 -0800 (PST) X-Google-Smtp-Source: AJdET5fQQiRHGmTluZPJn+bbyEOHO5NtCPbWSbyB48R3U2nAQAgWzywChjs047YOO5KlR4pMeMXe X-Received: by 2002:a62:2ad6:: with SMTP id q205-v6mr17194572pfq.152.1541966582023; Sun, 11 Nov 2018 12:03:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541966581; cv=none; d=google.com; s=arc-20160816; b=skdin059kXpAuXwC47shuzFCpheHzp8uQIVFwhepBd+37KuDJ2CbR8mz1GwZ8W9L8C oJra/E4eTiUY2Z6ghuVOAdts/H2Sfvdt1LrSvEp3yypWPDsLgVrMHSjDihJ6k20EQC3H S5bwhakrpJFQQgzAgvNLxbjMk+zQF5wWoE0tYtB3Aq7iHGQ40nzRdvzkMw4AML9HxScS 4l3aWY8ucFCF5AbUeovTIMhH9LFURJ/6rNvpItVeAnUUB9nFNUf5O2dyt391+Y2JU4G5 C3vsoWh+2CmzpBNB9SBwUA9rq3wao/LFjlMuSr/LUG178yCC0f5VowEurWJ4jkVNX7qD dxJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=8r9tIxYMkMnaaakVBPvrufHcfIcnQ/GanUQ02JQw8O0=; b=G2wJC62d3Sq1JzEfm6c0oEZFwY+Js46AZarhiQ+4D3OvBGo5Dy6Di8oi8tSsTuK7Oz +w2co/3lL2yp/A5H+Y5p33EEElh054wnChOyeRD+JdIqMGKSkxTDSx0lFZniq1bLo9Yi 76SgVcY0SDrL662FD98oVpUZXp/bz6ff0LtcyKf7A4v3OJkk9qVDPUvnydMGXSymjJ0A WiBGtsAf90qLfvyp+XcXXWAmvzgffA9fFTZd5k3zBpv+rIQ3rM+5ScvLUyLDYmNc2+6U xw203UX0hud44glmTG0l9YMYvPR42Nyi5UTRsMtqn1CfDeMt7Rr+YTGczi2heZqn49tO J/BQ== ARC-Authentication-Results: i=1; mx.google.com; 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 w65-v6si17158159pfd.55.2018.11.11.12.02.46; Sun, 11 Nov 2018 12:03:01 -0800 (PST) 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; 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 S1730834AbeKLFse (ORCPT + 99 others); Mon, 12 Nov 2018 00:48:34 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:51056 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730693AbeKLFsa (ORCPT ); Mon, 12 Nov 2018 00:48:30 -0500 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gLvsp-0000oO-02; Sun, 11 Nov 2018 19:58:59 +0000 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1gLvsX-0001kz-Hn; Sun, 11 Nov 2018 19:58:41 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "YueHaibing" , "David S. Miller" Date: Sun, 11 Nov 2018 19:49:05 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 275/366] net: caif: Add a missing rcu_read_unlock() in caif_flow_cb In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.61-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: YueHaibing commit 64119e05f7b31e83e2555f6782e6cdc8f81c63f4 upstream. Add a missing rcu_read_unlock in the error path Fixes: c95567c80352 ("caif: added check for potential null return") Signed-off-by: YueHaibing Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings --- net/caif/caif_dev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/net/caif/caif_dev.c +++ b/net/caif/caif_dev.c @@ -131,8 +131,10 @@ static void caif_flow_cb(struct sk_buff caifd = caif_get(skb->dev); WARN_ON(caifd == NULL); - if (caifd == NULL) + if (!caifd) { + rcu_read_unlock(); return; + } caifd_hold(caifd); rcu_read_unlock();