Re: [PATCH v2 2/3] smb/server: cancel async requests when closing connection

ChenXiaoSong <[email protected]>
Newsgroups org.kernel.vger.linux-cifs
Message-ID <[email protected]>
Ok, list_for_each_entry_safe() would indeed be safer. I will use 
list_for_each_entry_safe() in the next version.

On 7/16/26 10:13, Namjae Jeon wrote:
>> +       list_for_each_entry(work, &conn->async_requests, async_request_entry) {
> smb2_notify_cancel_fn() calls list_del_init() on async_request_entry.
> With list_for_each_entry(), the loop increment then follows the
> self-linked entry again, causing an infinite loop while holding
> request_lock ? So, should we use list_for_each_entry_safe() ?

-- 
ChenXiaoSong <[email protected]>
Chinese Homepage: https://chenxiaosong.com
English Homepage: https://chenxiaosong.com/en
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.