Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp53962ybg; Mon, 8 Jun 2020 16:14:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9bH7116jKSWh06d7UM4h/OTOfZMJIMDxitEiOuXyKnP6Q1PzyiX/jx4eKrUn5b7hqfuOi X-Received: by 2002:a05:6402:3c2:: with SMTP id t2mr24148833edw.361.1591658065511; Mon, 08 Jun 2020 16:14:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591658065; cv=none; d=google.com; s=arc-20160816; b=0BI4aNtb5aZKwSeHReaTLS7Ja6IHKQzwe6AjX6AYW5bRaoFRV71OMIq1HyVUM3g1JO m3iiBjK35TzEdzvTcDH48rkBPhV1q8BxALZcHna8Q5ap2bro5vd7o4vNJwJF/rO99naV ycjj+hn1AIRydO0HXW31E7YK9nnLJN+uc7lOuAPDtIhBdNCmjSJ3A+JkKbd1O7UArzJG F8S95fnC6FCtuqdOnMe0hArvJhBnluH937/SsT9t8PYDJkVTTrANBHR0MLkZbpyJfKJw L3y7XDI2DN6BYQdu9PfI5o4pkFfN6eLJMSH8wn/sR9h/JYAxiWKhleWkirs7ZOhtqHzy KZnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ZbbO46p539wSCsjhl4vg0aCCU8DfJm0ORH4ZQIdRlgw=; b=qyvf8lQNPv/Mad44dMjvLmdNYc5/iClB5MXsMNFL/C6/TOLKMHn4ZqBazybOixrdhS EJwlt3h/6tnyAslQh5AyUu7UiR3oFInnphnvxevrZqmT548vIU/nMG1/GiSxzlxPt9cg kulf8qE+04bDOgdDbYNjsEn1+MBuLUOaHRZCoGMmZo33JIZGawsT8l9twafpDqcHTTzT yWPuOxp+h607SqmguDkpri68+2z/ju1XvEjwaxgvjyr044aVfVeFjF5qEmm3BFgT9NEv 28F1gI3ubNuEUuMxZXm3AO6vJ8fNsASIbLp6dMqxL8gbfVn78G60XR2ZwbPL53xzk56K Ce4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iJlh3yd5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 5si10498284edl.268.2020.06.08.16.14.03; Mon, 08 Jun 2020 16:14:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iJlh3yd5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728969AbgFHXLn (ORCPT + 99 others); Mon, 8 Jun 2020 19:11:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:56160 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728575AbgFHXKH (ORCPT ); Mon, 8 Jun 2020 19:10:07 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 085FD21475; Mon, 8 Jun 2020 23:10:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591657806; bh=jBjbkxP1iiBAvE6/2yxT7Dz+8SrZGpJOC8QuAynfkJg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iJlh3yd5WIbE+DTy8OIJfwMVrSYJl8biQCYJWZyD20KTjGH2NXiBjc9rZ4EYBC9cQ lQB/UKzKyZB1ieVanEytud1jIow5c258sIFYgfcVHG/aV8h5h0Fz2Dyppoh1kzxsyM jZsYVdALjx97LIW3Ix9hw8o4I5WXGuoeQSI/UvxY= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Sagi Grimberg , Christoph Hellwig , Jens Axboe , Sasha Levin , linux-nvme@lists.infradead.org Subject: [PATCH AUTOSEL 5.7 183/274] nvme-tcp: use bh_lock in data_ready Date: Mon, 8 Jun 2020 19:04:36 -0400 Message-Id: <20200608230607.3361041-183-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200608230607.3361041-1-sashal@kernel.org> References: <20200608230607.3361041-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sagi Grimberg [ Upstream commit 386e5e6e1aa90b479fcf0467935922df8524393d ] data_ready may be invoked from send context or from softirq, so need bh locking for that. Fixes: 3f2304f8c6d6 ("nvme-tcp: add NVMe over TCP host driver") Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- drivers/nvme/host/tcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c index c15a92163c1f..4862fa962011 100644 --- a/drivers/nvme/host/tcp.c +++ b/drivers/nvme/host/tcp.c @@ -794,11 +794,11 @@ static void nvme_tcp_data_ready(struct sock *sk) { struct nvme_tcp_queue *queue; - read_lock(&sk->sk_callback_lock); + read_lock_bh(&sk->sk_callback_lock); queue = sk->sk_user_data; if (likely(queue && queue->rd_enabled)) queue_work_on(queue->io_cpu, nvme_tcp_wq, &queue->io_work); - read_unlock(&sk->sk_callback_lock); + read_unlock_bh(&sk->sk_callback_lock); } static void nvme_tcp_write_space(struct sock *sk) -- 2.25.1