Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3740504pxv; Mon, 28 Jun 2021 11:36:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYbrj+x9efK0M3TW6rNDmzAlbgoNUCtzTkCNMY9U0egkmNK8Jt2BkXAB9CPejJIacjcMwk X-Received: by 2002:a5d:8f95:: with SMTP id l21mr670639iol.25.1624905403381; Mon, 28 Jun 2021 11:36:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624905403; cv=none; d=google.com; s=arc-20160816; b=vX3Tp49mk0ZXOnm/nzb/plyd0QMRVKrBpe469k6NvLqJriTHTwU8zuj0MGSKb/ISR1 TKX5CH69l4jiYZOdD15zHVB3MbPHtyD6L+vLVE9LU1SWQSBWr6C3vAQ9m33EQjUKsPer YZkavMPZ2PlMqjvjaXc+8PysW3a69vWy0g9z1e+QjCz3XIjbWJhZs/INBO2XRL0JYTvK V1MPQJlKeNqXu+6epu/Aumk8kYCckMwbVX3IYgaAytae82gww7vhwKaOk8MHSwKrUlVu PS3OxFjT1OdZs5ZaMEtmkga6zcxbRozW/NDhjO188B2SaSb+XxtQALbVVb4kWzT7JOfI 0NiQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3W2AffCCTQBD47K6X6wy9EbqN1ofttXistZic/Kbhm4=; b=y1xSJ9nzDgpT+/pABhgqh5Iob3taAduOdAgCDvfCvHBYFfzqCoZlJup+EcqDFf3IRE KiLdq5R+UxGxLj8U2mDCajqQR9IwYA3uRXx7lMUBFfMOnO+Qwf3QQt1PqOuSMr+wrect GSr5Qa0SI0wNBfJb7Ksic09K2EFB8vqGMEGZILI/sb8QFuvs+Vnk8c791u3x09kX6ZeA 7iMIdWxKkmigQvjNHpffFiLUPTcC0Vrn0SdZBDUZCR2wEykHUo2wSVOYX6v9z+875bSi m/SF7KcNKrozCLKLvIqXrKDFVexTdD6Ki4GL6QmK8B7Xj4e/lPC63eMzUf/e4fmKH7Gc ZK3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ebhlXrfU; 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 g2si23161526ioo.75.2021.06.28.11.36.29; Mon, 28 Jun 2021 11:36:43 -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=k20201202 header.b=ebhlXrfU; 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 S233753AbhF1PIH (ORCPT + 99 others); Mon, 28 Jun 2021 11:08:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:53670 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236327AbhF1OrW (ORCPT ); Mon, 28 Jun 2021 10:47:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3852C61CAB; Mon, 28 Jun 2021 14:36:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624890997; bh=aAI/46Ras21Co2Ll9FAuQ+ltWSKOi10RTPNrJe5ufAo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ebhlXrfU8saPONPX8qvCTQJ8rjPl7XA+y6js69CnJ3v00O+8LYD0rLbZPQVWLTLHq IwW2ppwOBx1AlF0cg3fUKl7vNgksp+qkRKEnAhE+z4AaEN/PGEU9V/VCWtuqrxDWKK JmgSNSR9WxDEr9S7OM2jyvnFwovYcNjmGLzTZRJPsK8+9eWksYk5G64okAt+56ZLpL aICv0x/OyG5GzOXRYIyCEY5m1pGzdV3qqW3sgdLyVrhxPHEts+jbLAYQWS9AZaL5nf 7+cX0VzLTGYRotG+oyWm6DlyN2qbRioSfd5dkM/VtnEgeMLFwLLWeJV+yecZ1Tw9vC PLGowtWHc01rw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Maurizio Lombardi , Bart Van Assche , "Martin K . Petersen" , Sasha Levin Subject: [PATCH 4.14 08/88] scsi: target: core: Fix warning on realtime kernels Date: Mon, 28 Jun 2021 10:35:08 -0400 Message-Id: <20210628143628.33342-9-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210628143628.33342-1-sashal@kernel.org> References: <20210628143628.33342-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.238-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.14.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.14.238-rc1 X-KernelTest-Deadline: 2021-06-30T14:36+00:00 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 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 0d0be7d8b9d6..852680e85921 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -2966,9 +2966,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