Re: [PATCH] watch_queue: Fix missing locking in watch_queue_set_size()
From: Cen Zhang (Microsoft)
Date: Thu Oct 08 2026 - 23:59:47 EST
> + /* Use lock since watches may already be attached. */
> + spin_lock_bh(&wqueue->lock);
> wqueue->notes = pages;
> wqueue->notes_bitmap = bitmap;
> wqueue->nr_pages = nr_pages;
> wqueue->nr_notes = nr_notes;
> + spin_unlock_bh(&wqueue->lock);
I'll send a v2 tomorrow, replacing the lock with smp_store_release()/
smp_load_acquire() for wqueue->nr_notes.