Re: [PATCH] ksmbd: annotate oplock list traversals under m_lock
Namjae Jeon <[email protected]>
| Newsgroups | org.kernel.vger.linux-cifs,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CAKYAXd-s1WerGPxaf2bYLUsvh_OMNrEtvruC5YBgtHJjGSu9Sg@mail.gmail.com> |
On Fri, Jun 26, 2026 at 1:04 PM Runyu Xiao <[email protected]> wrote: > > session_fd_check() and ksmbd_reopen_durable_fd() walk ci->m_op_list with > list_for_each_entry_rcu() while holding ci->m_lock for write. That is > the local inode/oplock serializer, but the RCU-list iterator does not > currently tell lockdep about it. > > Pass lockdep_is_held(&ci->m_lock) to these iterators so > CONFIG_PROVE_RCU_LIST can see the rwsem protection already in place. > > This was found by our static analysis tool and then manually reviewed > against the current tree. The dynamic triage evidence is a > target-matched CONFIG_PROVE_RCU_LIST warning; the change is limited > to documenting the existing protection contract. > > This is a lockdep annotation cleanup. It does not change oplock list > lifetime or durable-handle behavior. > > Signed-off-by: Runyu Xiao <[email protected]> Applied it to #ksmbd-for-next-next. Thanks!