Thread (20 messages) 20 messages, 3 authors, 2026-02-26

Re: [PATCH net-next 1/7] bng_en: add per-PF workqueue, timer, and slow-path task

From: Bhargava Chenna Marreddy <hidden>
Date: 2026-02-26 14:06:01
Also in: lkml

On Wed, Feb 25, 2026 at 8:02 AM Jakub Kicinski [off-list ref] wrote:
On Mon, 23 Feb 2026 22:06:35 +0530 Bhargava Marreddy wrote:
quoted
+     if (atomic_read(&bn->intr_sem) != 0)
+             goto bnge_restart_timer;
+
+     /* Periodic work added by later patches */
+
+bnge_restart_timer:
+     mod_timer(&bn->timer, jiffies + bn->current_interval);
This intr_sem thing looks highly questionable.

It provides no synchronization guarantee since the state of intr_sem
may change immediately after the read. Please use normal locking
primitives and/or cancel the timer _sync() if you want to make sure
it's not running.
Hi Jakub,

Agreed. The intr_sem will be removed in v2. The timer already checks
BNGE_STATE_OPEN, which is cleared before del_timer_sync() in the
close path. This ensures the timer either exits early upon seeing the
cleared bit or is synchronized by the cancel call.

Thanks,
Bhargava Marreddy

Attachments

  • smime.p7s [application/pkcs7-signature] 5496 bytes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help