Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1821478imm; Mon, 3 Sep 2018 10:18:05 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaeOQ470FbPaG7m91tHxMusGKRnY0is9yR3Rc7RORjbDf75Lf+IRDH9Y3UtY+gUaui2fhSL X-Received: by 2002:a17:902:7884:: with SMTP id q4-v6mr29157271pll.174.1535995085469; Mon, 03 Sep 2018 10:18:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535995085; cv=none; d=google.com; s=arc-20160816; b=m8cH6GT/PAPNIv8twybtzEc++y0tCj4Yuyqg44nTk9S6sqAhP89OLx4efxDTCW30O/ GA14Fa8q45TtA76DtdBMSs/e9NOqmSR/nMz4pK7CqWLSHPMgZzZFq5JA5GLagRz6ctLY Lipv0RaAvl/TjzepER4+fhh+/Ncztm/OUJe92nzUL1bgyQGi5x7GBQYOsaJZE0eKgQGn QOxc8Z5ViAoY//mCD7LJDjkjXf7xUEcXXY7lZEuv8BO+qWL8vtTZuKE0HuzqJW8mRIW4 I55hs38w1q1Hb9pkz3NbhoVZdHeW1dXThPa7MwP+IXGtnyLBEzAepaTB9yYAw6iFz7LA F3uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=cgKyGhFrSTliAES2Df9+ZvPz9qLdscqF4OiHs8EBr50=; b=ypp36fEXtE0lFi6JoKp2JF/scgn6K1KIweD8Lv6jP7YuTyXM3jlJUHvR6sLEPCV0zy ath6nQCvx1kwOtsWPHerusiq6TlmDyGmrKSTSWEK2KFghd7Se1yIla2RCIgd9Btc5IhY MZhPTTxrwkU6tW/ALHoRGdMOkmSmXXGEdAvzS/5ZbYxiJF6j2TZZG7gHC4JO/hOSY/TH gJp7lijLF7bx3B7IkxWyraWXo4Em52iGyGrUkI1a67lqgyZ4KMQAKTO0YUyxgwnQn6VF PptY2UaNJC+lTQLmgT2HlCW2sHHzXf8deYedb9gj57qSxKiiP4lMPB4gTGoU4wHSXQnC L6Yw== 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 t7-v6si15987486plo.165.2018.09.03.10.17.50; Mon, 03 Sep 2018 10:18:05 -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; 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 S1730035AbeICVhv (ORCPT + 99 others); Mon, 3 Sep 2018 17:37:51 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:42634 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728405AbeICVhu (ORCPT ); Mon, 3 Sep 2018 17:37:50 -0400 Received: from localhost (ip-213-127-74-90.ip.prioritytelecom.net [213.127.74.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id B88FAD02; Mon, 3 Sep 2018 17:16:45 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, YueHaibing , "David S. Miller" , Sasha Levin Subject: [PATCH 4.14 033/165] net: caif: Add a missing rcu_read_unlock() in caif_flow_cb Date: Mon, 3 Sep 2018 18:55:19 +0200 Message-Id: <20180903165656.755271973@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180903165655.003605184@linuxfoundation.org> References: <20180903165655.003605184@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: YueHaibing [ Upstream commit 64119e05f7b31e83e2555f6782e6cdc8f81c63f4 ] 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: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- 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();