From nobody Sat Feb 7 04:10:43 2026 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; envelope-from=linux-kernel-owner@vger.kernel.org; helo=vger.kernel.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1622480404; cv=none; d=zohomail.com; s=zohoarc; b=L1vq+r+BzHcuffcwN0Oy/sQpgTxA1rvkV7DpFxuYwKSS29QpAlCmtXyjD4Qo+2Od6MVsZ0UJySsTK8xHWFyWNCxwt7f/0udIY5pd2zJ67qDrj5WKjUig06CGIVY/wrXIxPNVcXHzoV0sq4oOumockII79J6g7ohyor6cQce87Ug= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622480404; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:MIME-Version:Message-ID:Subject:To; bh=4JcYhWe8fmp3R5gpBfuApjCZLko+hwnxUS+X7YLgb84=; b=JhqQLWhCCatuQHrSWkT5IUTmI4YDDWwdOyvdKhMna2KkbwhV1ENf3D2p6Oui9L+y3lfvnEjfgYodPYLPkN+p5z+XloXuvSWBvFG0OEyCG07aFRd88oBCqUHWAJGAoD4SGMp06YKX/IkiGK+IXi1f6NxSAYnNJNLgPdyb3/FYnk0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mx.zohomail.com with SMTP id 1622480404152222.20969201603134; Mon, 31 May 2021 10:00:04 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234997AbhEaRAq (ORCPT ); Mon, 31 May 2021 13:00:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:54019 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234664AbhEaP1x (ORCPT ); Mon, 31 May 2021 11:27:53 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-331-dcUBGinZOB6OVHW4wm3kKQ-1; Mon, 31 May 2021 11:24:54 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8D6DE8015C6; Mon, 31 May 2021 15:24:52 +0000 (UTC) Received: from wcosta.com (ovpn-116-128.gru2.redhat.com [10.97.116.128]) by smtp.corp.redhat.com (Postfix) with ESMTP id CA3006062C; Mon, 31 May 2021 15:24:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622474699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=4JcYhWe8fmp3R5gpBfuApjCZLko+hwnxUS+X7YLgb84=; b=VLMmZAY0pb1/uDMahZxwMJbNyYqe5AIthJ2ec0GMAbR0upgz7pyZjogtEHfAHvw4+NoX56 n6PLAfELH9qVQWHEUWti+HQm6NHlAP3F0uEu+0sOC9m89awE0upv+FYIaHfFyE3JidNaT7 RuFg2ojvjfi70suS6HkSQ1cciKQifbQ= X-MC-Unique: dcUBGinZOB6OVHW4wm3kKQ-1 From: wander@redhat.com Cc: linux-rt-users@vger.kernel.org, bigeasy@linutronix.de, tglx@linutronix.de, rostedt@goodmis.org, Wander Lairson Costa , "David S. Miller" , Jakub Kicinski , Florian Fainelli , Andrew Lunn , Vladimir Oltean , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] netpoll: don't require irqs disabled in rt kernels Date: Mon, 31 May 2021 12:23:23 -0300 Message-Id: <20210531152325.36671-1-wander@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Wander Lairson Costa write_msg(netconsole.c:836) calls netpoll_send_udp after a call to spin_lock_irqsave, which normally disables interrupts; but in PREEMPT_RT this call just locks an rt_mutex without disabling irqs. In this case, netpoll_send_udp is called with interrupts enabled. Signed-off-by: Wander Lairson Costa --- net/core/netpoll.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/core/netpoll.c b/net/core/netpoll.c index c310c7c1cef7..0a6b04714558 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c @@ -36,6 +36,7 @@ #include #include #include +#include =20 /* * We maintain a small pool of fully-sized skbs, to make sure the @@ -389,7 +390,8 @@ void netpoll_send_udp(struct netpoll *np, const char *m= sg, int len) static atomic_t ip_ident; struct ipv6hdr *ip6h; =20 - WARN_ON_ONCE(!irqs_disabled()); + if (!IS_ENABLED(CONFIG_PREEMPT_RT)) + WARN_ON_ONCE(!irqs_disabled()); =20 udp_len =3D len + sizeof(*udph); if (np->ipv6) --=20 2.27.0