Re: [drivers/usb/usbip] BUG: corrupted list in vep_queue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Greg,

I'm curious about the best approach to fix this issue. I'm unsure if
adding a spinlock or mutex around the code would be good to ensure
that only one thread can modify the list at a time (then fix this
issue).

Alternatively, we could check if the entry is already in the list
within the vep_queue function:
```
if (!list_empty(&new_entry->list)) {
    // Entry is already in the list, handle it (e.g., log an error or ignore)
    return -EEXIST; // Or another appropriate error code
}

// Safe to add the entry to the list
list_add_tail(&new_entry->list, &queue->list);
```

This approach would avoid unnecessary locking overhead if the entry is
not already in the list.

Please let me know your thoughts on these options or if you have any
other suggestions.

Best,
Chenyuan

On Fri, Oct 11, 2024 at 12:21 AM Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>
> On Fri, Oct 11, 2024 at 12:13:53AM -0500, Chenyuan Yang wrote:
> > Dear Linux Developers for USB OVER IP DRIVER,
> >
> > We encountered "BUG: corrupted list in vep_queue" when testing the
> > DVB driver with Syzkaller and our generated specifications.
> >
> > Linux version: Linux 6.12-rc2 (8cf0b93919e13d1e8d4466eb4080a4c4d9d66d7b)
> > Configuration is attached.
> > Syz and C reproducers are as below:
>
>
> Great, can you please send us a patch to resolve this issue as you can
> test it easily?
>
> thanks,
>
> greg k-h





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux