Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Jun 2025 13:02:14 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 287501] Fix witness warning w.r.t rcu_read_lock() API
Message-ID:  <bug-287501-227-Ci1RydaKfT@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-287501-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | previous in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=287501

--- Comment #3 from Mark Johnston <markj@FreeBSD.org> ---
(In reply to Sreekanth Reddy from comment #2)
The LinuxKPI has some constraints compared to native Linux.  In particular, we
lazily allocate per-thread memory for the LinuxKPI; that allocation is
happening here in rcu_read_lock(), which is triggering the warning.  After that
allocation is done once for the current thread, rcu_read_lock() calls will not
allocate memory and you will not see a warning.

So, the solution is either:
- don't use the linuxkpi in this context, or
- ensure that linux_set_current() has already been called before entering an
RCU read section, but drivers should not call this directly, so we would need
to see more code from bnxt_tls_snd_tag_free() to understand how best to handle
this

-- 
You are receiving this mail because:
You are the assignee for the bug.

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-287501-227-Ci1RydaKfT>