Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp891465pxj; Wed, 16 Jun 2021 16:27:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyI9YF4NsHjvByaD2q7RLdZHDQ+x55VOK96fzsvwlb1NireNy7frNlgsQD4NzGLKgu8j// X-Received: by 2002:a17:906:d797:: with SMTP id pj23mr1915262ejb.367.1623886062800; Wed, 16 Jun 2021 16:27:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623886062; cv=none; d=google.com; s=arc-20160816; b=hjwlAQwvSSg2PJ/cGPhJVmDXWL51J04VNWFEwLbM40pUpLq5+S0xiksT66zvwuLLuA hk69bTQ1IOLIR9KaMJ74BEYzLsHChQkUkxKcD6JOx+SoWrN97tT7i71Oj2eBdVFavUXz Uv9bb6QndbJN7+f8UpAhQZuA6S5rJ3Jp5B+UWt+HbY+imrdryI84YP2pF9rXwL+x+Vuo mskumwi2jU38u7d4oT9IwqoBM6J6sIXdqUAxzxpN5V7sKFfMJsPSgcO9DeaycJ43R/2s M+WjIYL2bewZHXJvkhBNumOvIqFxLx0Rzt99xzn47Z0VmOKnnJBxD25/tHfxHvnZMcrP IUWg== 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=/YECWiVrRAZjbP7o/KtoRxBPBmL8WaCPjUwprEaZArk=; b=aFD7aabaTj4OgO8BTfJm5bBSqmnMBf33uQCjUXw8OpEiOkZ/p1g/Tx+8o/F0/rR2zo V6kbPaDQbCoEos6osN+B/ZsguSlAge0BSRPD8mroFs1qT50H3IybhBQtvJfN7Qt0xUac AKa1+l379ZcHyutj/6AOBtVvHPENtzwu1WGy5K8KfXvUHfFCeI1/UAy9y/1YHtaHcYak TUSncFDRBj5vHKFD/X4M9uT+gqV7KqJrZTycjuWcmbfPHp8pvakuo8xh9Ws2pRfxM60V 74Sex0wv2IOi1aLghacW+bnynPowJcuD5xzXZutusKxyLJdn/RDtJeOTILrUTZIdakp8 yWNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lrnTXqSj; 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 y10si3667104ejk.72.2021.06.16.16.27.20; Wed, 16 Jun 2021 16:27:42 -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=lrnTXqSj; 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 S235076AbhFPPqf (ORCPT + 99 others); Wed, 16 Jun 2021 11:46:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:56892 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235707AbhFPPnn (ORCPT ); Wed, 16 Jun 2021 11:43:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DE6C2613DC; Wed, 16 Jun 2021 15:38:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623857903; bh=NNYMrU7qDmvuDUIHGSDRc0rCC7wKmCagHB5KajDZb9c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lrnTXqSj6qMymy0N1kz6/TSBh6AxUEcESRHiaNr1CzNbXcB4n2b3JoZSLvw6lZ38p l9ydSoM/iw2wkys5kLWVc+vKuLt7+t4F7RA2oG6LByxIGBkTOuOBM5cNa1bWldUITv qeLsbjRCSIj3WeV9rM2PbGRrAuTFHhCA6+dqKVwc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Bart Van Assche , Maurizio Lombardi , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 5.12 30/48] scsi: target: core: Fix warning on realtime kernels Date: Wed, 16 Jun 2021 17:33:40 +0200 Message-Id: <20210616152837.600720020@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210616152836.655643420@linuxfoundation.org> References: <20210616152836.655643420@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: Maurizio Lombardi [ Upstream commit 515da6f4295c2c42b8c54572cce3d2dd1167c41e ] On realtime kernels, spin_lock_irq*(spinlock_t) do not disable the interrupts, a call to irqs_disabled() will return false thus firing a warning in __transport_wait_for_tasks(). Remove the warning and also replace assert_spin_locked() with lockdep_assert_held() Link: https://lore.kernel.org/r/20210531121326.3649-1-mlombard@redhat.com Reviewed-by: Bart Van Assche Signed-off-by: Maurizio Lombardi Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/target/target_core_transport.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 9e8cd07179d7..28479addb2d1 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -2995,9 +2995,7 @@ __transport_wait_for_tasks(struct se_cmd *cmd, bool fabric_stop, __releases(&cmd->t_state_lock) __acquires(&cmd->t_state_lock) { - - assert_spin_locked(&cmd->t_state_lock); - WARN_ON_ONCE(!irqs_disabled()); + lockdep_assert_held(&cmd->t_state_lock); if (fabric_stop) cmd->transport_state |= CMD_T_FABRIC_STOP; -- 2.30.2