Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 833F0C636CC for ; Tue, 31 Jan 2023 15:02:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232723AbjAaPCP (ORCPT ); Tue, 31 Jan 2023 10:02:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232705AbjAaPBd (ORCPT ); Tue, 31 Jan 2023 10:01:33 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96CCD8A72; Tue, 31 Jan 2023 07:00:38 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7F8CB61562; Tue, 31 Jan 2023 15:00:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26DF8C433A0; Tue, 31 Jan 2023 15:00:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675177237; bh=DWj+O7moT18+ZTe+Ogcv2iDKxrxaudaFhD+wXevmfXU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cEEMwZApbIqhlUvB3D6XKChGhwBFgW5uduXWukUh5Q3oVxNGrrR8Ckie++ROUDhR4 qh4pTterhgXlnQQCZuzDmvFuvqLK2Q+Ije4A6K1636q+STgiRpD5XaAzZ1r0CShPiV iiLd7G4AjSqNQfpATeI0n0YGAD62G3rhfW9FUUzCDq+qCuapRyCAPN7Wkpdpj7agk4 zhLJdUNvZJhDisMJRH9G23mdwdCvEif+LA4qWjeSTt3GtuTPIxMwldei+ffWXxynAH ssXRuvUGlbqAymSnxDfoBYR7Xu3q4TRrDTiloiofzkZrFumwgRCneIw9Y93oARD2Z0 4HcfnqOQotu5Q== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Maurizio Lombardi , Christoph Hellwig , "Martin K . Petersen" , Sasha Levin , linux-scsi@vger.kernel.org, target-devel@vger.kernel.org Subject: [PATCH AUTOSEL 5.15 03/12] scsi: target: core: Fix warning on RT kernels Date: Tue, 31 Jan 2023 10:00:21 -0500 Message-Id: <20230131150030.1250104-3-sashal@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230131150030.1250104-1-sashal@kernel.org> References: <20230131150030.1250104-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Maurizio Lombardi [ Upstream commit 84ed64b1a7a7fcd507598dee7708c1f225123711 ] Calling spin_lock_irqsave() does not disable the interrupts on realtime kernels, remove the warning and replace assert_spin_locked() with lockdep_assert_held(). Signed-off-by: Maurizio Lombardi Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230110125310.55884-1-mlombard@redhat.com Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/target/target_core_tmr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/target/target_core_tmr.c b/drivers/target/target_core_tmr.c index bac111456fa1..2b95b4550a63 100644 --- a/drivers/target/target_core_tmr.c +++ b/drivers/target/target_core_tmr.c @@ -73,8 +73,8 @@ static bool __target_check_io_state(struct se_cmd *se_cmd, { struct se_session *sess = se_cmd->se_sess; - assert_spin_locked(&sess->sess_cmd_lock); - WARN_ON_ONCE(!irqs_disabled()); + lockdep_assert_held(&sess->sess_cmd_lock); + /* * If command already reached CMD_T_COMPLETE state within * target_complete_cmd() or CMD_T_FABRIC_STOP due to shutdown, -- 2.39.0