Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4611259pxj; Wed, 12 May 2021 09:12:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRAN8z9Hi9PS4j2+DgfqgFYbfoUPwuumjnqXJ3Fv8xBV+Rqmil0RlwI/YZCCrJRAXDjBpf X-Received: by 2002:a17:906:4f91:: with SMTP id o17mr38422600eju.503.1620835970082; Wed, 12 May 2021 09:12:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620835970; cv=none; d=google.com; s=arc-20160816; b=Fpe1sbZPs5QFwX5cUc7FBsO5f/Lx3k4s8FGTm2aWmFPWFnnHLZWi+IBu8A1lPf0euk YJYm2OdwzwiZsKU0iw/YbGAMQTTXLtXptGpgiGZSumg1j65WBQs9wVozbx/wJ10lAT+k 5zgK4tNsKOL8n3fL+gGtinv+txDNoSmndf3Hr0gokxaWTjDPMNp/4uyKyaJXokuWLZ5X RH18Vs7a4IFxC8+Hh2zv/OYebCWL1P8CURCRvgIofU6aeDvCJe1uZ2Emrh+xoEJNjM/u /6pBjHvEvkapBR+pnoOcoJ2PCjyv8tbNEE2n+SxiVg/qa+TNwDmieSGOaHDOHMcsb/UT rR5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=019zvkBQZjx/P91WKZ0putI+h/IqulhEuLeSr9mkn5o=; b=A4ubegqwMB/oT+7kECvmMtO8ISjwg8RsqPCZrZuQ2s/qWKcUUzWej0VrPns+jPxFml mPixHvbGsyjCilSXw+d2RFnfnWDX6lC98wBQnDjuLnX+69N0t2W4BxwHCV78ebW5zgm3 bZ0OVcrJf6kMxwSVeUmCNWMrK6mTlbbfxol61K5IoXaPcHZCdV3x1C9JPbUSCZiYaqSc YL+SzaCON15e9wuj5jz0LPGsLenZAJfgOsmvVlFNkMGnCNk7lrxyDRbjWpbZg1sVjhNs MrYO0HnlyQEfWeIvUuK/LLWjOpV/XYtD9sY1quRaKZ3k+b97peC42h9urwikVdds6ARl H49Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2fNAOQDv; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m19si163650edd.517.2021.05.12.09.12.06; Wed, 12 May 2021 09:12:50 -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=@linuxfoundation.org header.s=korg header.b=2fNAOQDv; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235278AbhELQJT (ORCPT + 99 others); Wed, 12 May 2021 12:09:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:39078 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233427AbhELP3D (ORCPT ); Wed, 12 May 2021 11:29:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6A8976144C; Wed, 12 May 2021 15:15:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832505; bh=BowfIlNbND07qhj7tCfKfdEs8T/IQ6U7ydVTT94mZS8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2fNAOQDvmU6VFbQdmG3l9cxBLqBIO0d48Ol5WIdY2GEDXGeuUSpKITiK6lpqkfsdP Y/PczjzEGV3hgLAux+rXzP+5DhBZYfO3ddopdgJVUeYr6XWOs9LgfrRriU+L/g8GOM GbdnX4uwZU1LqBIZqGVxSSU6LxfoXCqCTjWOCXQc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sagi Grimberg , Christoph Hellwig , Sasha Levin Subject: [PATCH 5.10 308/530] nvme-tcp: block BH in sk state_change sk callback Date: Wed, 12 May 2021 16:46:58 +0200 Message-Id: <20210512144829.919424583@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sagi Grimberg [ Upstream commit 8b73b45d54a14588f86792869bfb23098ea254cb ] The TCP stack can run from process context for a long time so we should disable BH here. Fixes: 3f2304f8c6d6 ("nvme-tcp: add NVMe over TCP host driver") Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig 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 9444e5e2a95b..4cf81f3841ae 100644 --- a/drivers/nvme/host/tcp.c +++ b/drivers/nvme/host/tcp.c @@ -874,7 +874,7 @@ static void nvme_tcp_state_change(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 (!queue) goto done; @@ -895,7 +895,7 @@ static void nvme_tcp_state_change(struct sock *sk) queue->state_change(sk); done: - read_unlock(&sk->sk_callback_lock); + read_unlock_bh(&sk->sk_callback_lock); } static inline bool nvme_tcp_queue_more(struct nvme_tcp_queue *queue) -- 2.30.2