From nobody Fri Sep 11 15:50:55 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4hhJt7608zz6sXty for ; Fri, 11 Sep 2026 15:50:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hhJt75655z4ZbJ for ; Fri, 11 Sep 2026 15:50:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789141855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oFfW623YjCx3isrf8OFjXWmmcsK2ZoNbZhUq8chNiew=; b=Th5ocOX/fvGbD4Wtn6BXbWjJ9UMz07FJg63mOT4doMJuSimkJx4I95leS9ko2+kPrmfzdx aa7Km+5yIrU1heF+50bMsSCikvSYj+udPLxJrM+yAI+z8HG7ma8HHdUgfV7YSw/MNRw9kG WE7/mzFy3HU1TpxMhY+4p1vbHycmROYFs2fLoasN7VRazg1xnq53oiAivr7i4aGgp5Gogp afUhmgS76r1MNHmyZWeQgnvuYdWF8DSB5IHTI8TGLQOpgEtUYQFUes0wTp6ik072h8E1ra 2pDCK7Mo0Khc+LvhG6yDzkIv6D6XtKcCR0WWkVYk9KaLTZawoQQ4xsRqgNE5vw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789141855; b=QWREkIQwn7fQ+ZN+E5cS5UMtboGTRBCznG87iNCopcqmqq26zzCRrghZ/8zOGHkxYUK89d jnecMBp9hYIHpBt28uWUpwklqQo0ArLhgE8grSe9gqCro5IEL9lSMBPMgpSHFNpLocm2vK XkelPkH4Rk2vvnUDk/ZdU2eKSSKPmWZqdUZ0WzRNdEaF9Pp6LfGjXKT19RxRHUZN4bonwm tyvI0kKiyvBaQsE3zNPHxS1G0RF63IoyHcG/gVwOy2cEix3/b3udFcjL1wuD60YTSBN6rC eavPME5UcT9m6JS2MdqOBam2ef19hTfzxRBUGxQ0o2CJwarFsQYSuqTeKBxAtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789141855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oFfW623YjCx3isrf8OFjXWmmcsK2ZoNbZhUq8chNiew=; b=nly5FacewbBSbleej+h+dem6zA9mqoVr+YJBMEVDyP3TyU3AiZU80idNPpeQ7YgMkC/mcB ir0jJ+HOTf75g2kbKWDcz+1AkV5D9nmNLxFSF360CZJEdAsD0ugBlieNKBpzXyIE2pTNEm iPgbAHsuWnU2VyvYEesEITqo27JdrfuGNAgsGsifUO58HDj1LlkfySnzpythLxC60hb9HH B3Y9YeS8E1Bdwwdz/wrQf+bn5PLbAlB5fNh+RWeMUiA+xffGDebBYyHw+z9D44iU9ciiGJ l2feyVNS9L80HQis9r9HccpHVUdSnkeG+0lPIAF/DmOiY3yuXLMOWtQGWHXkWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hhJt749R6zKhw for ; Fri, 11 Sep 2026 15:50:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38def by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 11 Sep 2026 15:50:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: JustAnotherHumanBeing From: Vladimir Kondratyev Subject: git: 0d022baa047a - main - LinuxKPI: Run irq_work callbacks under RCU protection List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0d022baa047aea6499e394d2cd8d097820ecf486 Auto-Submitted: auto-generated Date: Fri, 11 Sep 2026 15:50:55 +0000 Message-Id: <6aa4235f.38def.1049a0e0@gitrepo.freebsd.org> The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=0d022baa047aea6499e394d2cd8d097820ecf486 commit 0d022baa047aea6499e394d2cd8d097820ecf486 Author: JustAnotherHumanBeing AuthorDate: 2026-09-11 15:49:23 +0000 Commit: Vladimir Kondratyev CommitDate: 2026-09-11 15:49:23 +0000 LinuxKPI: Run irq_work callbacks under RCU protection Linux executes irq_work callbacks from an interrupt context that provides implicit RCU read-side protection. LinuxKPI dispatches these callbacks through a taskqueue, so provide equivalent protection explicitly. This prevents an RCU grace period from completing while an irq_work callback is still using an RCU-protected object. Suggested by: wulf Tested by: JustAnotherHumanBeing Signed-off-by: JustAnotherHumanBeing Pull Request: https://github.com/freebsd/freebsd-src/pull/2385 --- sys/compat/linuxkpi/common/include/linux/irq_work.h | 2 ++ sys/compat/linuxkpi/common/src/linux_work.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/irq_work.h b/sys/compat/linuxkpi/common/include/linux/irq_work.h index 7c4019bc0242..120df40d0c0f 100644 --- a/sys/compat/linuxkpi/common/include/linux/irq_work.h +++ b/sys/compat/linuxkpi/common/include/linux/irq_work.h @@ -33,6 +33,7 @@ #include #include +#include #include #define LKPI_IRQ_WORK_STD_TQ system_wq->taskqueue @@ -85,6 +86,7 @@ static inline void irq_work_sync(struct irq_work *irqw) { taskqueue_drain(LKPI_IRQ_WORK_TQ, &irqw->irq_task); + synchronize_rcu(); } #endif /* _LINUXKPI_LINUX_IRQ_WORK_H_ */ diff --git a/sys/compat/linuxkpi/common/src/linux_work.c b/sys/compat/linuxkpi/common/src/linux_work.c index bb25893d9c71..02dfb35d9fd0 100644 --- a/sys/compat/linuxkpi/common/src/linux_work.c +++ b/sys/compat/linuxkpi/common/src/linux_work.c @@ -757,7 +757,9 @@ linux_irq_work_fn(void *context, int pending) { struct irq_work *irqw = context; + rcu_read_lock(); irqw->func(irqw); + rcu_read_unlock(); } static void @@ -791,6 +793,7 @@ SYSINIT(linux_irq_work_init, SI_SUB_TASKQ, SI_ORDER_SECOND, static void linux_irq_work_uninit(void *arg) { + /* taskqueue_drain_all() executes synchronize_rcu() implicitly */ taskqueue_drain_all(linux_irq_work_tq); taskqueue_free(linux_irq_work_tq); }