Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3853275pxv; Mon, 28 Jun 2021 14:45:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMG+VjVg1pC0rH65j4tdoCNiXTQ2p6RmikP4iXgg3onkeCfNmHNQyZwZFG99Ab2kXRjec/ X-Received: by 2002:aa7:dbc8:: with SMTP id v8mr31739352edt.242.1624916730671; Mon, 28 Jun 2021 14:45:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624916730; cv=none; d=google.com; s=arc-20160816; b=SRY+Z/GNM63Vny2I9XVMzFz5/aix105YxAFffjbKsEYAYBr/l3wXY0isPdv5f+XT8N ucXKpIjerle7WHjZKvVr6UN+CPzjToFumeGNJ+0+2tfcTf4H9y4/7ruj7VZE7YaesgZO 7gRR7k67RWDSgboUbG6JrMIsuqGjWNe3dmbDVxqnFZT3aKjS6aNFv2NK/qbDRU/cBPtF EmNSaDKbnFADSm5a8q1RXgJNAECBOH3QKE3WkPRsOzoueAtY/AN1KOSAfadGljB1jvav Gz2hmSHdu1RMBO09bDAGKpgUapsZhEr9B0gNRZ+iZPrq+4LgkuuzBIfDGAK/6tQzrCla nDGA== 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=v3vt2qsW9RHpbXXzdnKLVM9Exk3q3iLWMXb9ZkvNAqk=; b=pbkvk7qG8Mp+aaR/tFthFZ41Ury0Qmchliayypr8DtkPi8q4Z2blRkR8Hizlvm8AED QMO0lnWA1ZC/WwmG0KJxbWAnR9xp94yjSR6mkuV8FIOEMGkLkAgV11ScU8cOWEoOK7kJ vZisYxxpdOH+I6eW6cJZr/SqIX8xS9wCwBCnvqQ7fyB6q5wilcG7H+Gcph1JIibIbrL5 AHMlvpG4X21XvnqHqU67HjLJh+z4wPqNY6/4FTUU1iy2D6F6MidvRfu0tOtTkW8JdBGA dOSjAKyv6Enpk7sOrV11iDdy/jgRlM+Jc7PjQTtonRuHyA/qsR0kPMbruanD1ME7nKXr Y9Hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sJNw5nck; 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 c11si16377941edy.282.2021.06.28.14.44.55; Mon, 28 Jun 2021 14:45:30 -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=sJNw5nck; 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 S235670AbhF1PS2 (ORCPT + 99 others); Mon, 28 Jun 2021 11:18:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:34084 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236946AbhF1O41 (ORCPT ); Mon, 28 Jun 2021 10:56:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A6C046128E; Mon, 28 Jun 2021 14:40:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624891212; bh=5Sl8I8Ml7VwpxWr4N193h06mLtdoczZ+qYc6AYXhh+k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sJNw5nck6zH8qp7xeejCoWXiEa7EoFgE8dzeJxSSuhlie9lES9tbvwOQ6lvmQ2sIa r5pLF8+P1jFQ/G6swqYtnYfIsQqUMw0jgpg8gr9SQrNTa0IgCKli1STcKrNESCSsSt 8+lcZJxo/Fk6Mgvd6bfO6en/E9g4mUAGI86YLz6qeSmI1oijOHOgW0/SesfXjrm0F+ jtAF2SLgZdYmnkxyENXqBYdKk4wfKXhi8gC1qj2MKC2nm8YUhndFLEyQkFhcyEXRHF HKH5N6hoPx9PGTT+z9Y8IGJ8LlnvOYoAUR0k4jy5UTomKozQXlbcxaGDC7FMzG3xAr KrGy6xWS1M7Ww== 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.9 08/71] scsi: target: core: Fix warning on realtime kernels Date: Mon, 28 Jun 2021 10:39:00 -0400 Message-Id: <20210628144003.34260-9-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210628144003.34260-1-sashal@kernel.org> References: <20210628144003.34260-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.274-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.9.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.9.274-rc1 X-KernelTest-Deadline: 2021-06-30T14:39+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 ecd707f74ddc..6afb65387be6 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -2779,9 +2779,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