On Mon, Jul 01, 2024 at 04:49:41PM GMT, Luigi Leonardi wrote:
Hi all,
+ /* Inside RCU, can't sleep! */
+ ret = mutex_trylock(&vsock->tx_lock);
+ if (unlikely(ret == 0))
+ goto out_worker;
I just realized that here I don't release the tx_lock and
that the email subject is "PATCH PATCH".
I will fix this in the next version.
What about adding a function to handle all these steps?
So we can handle better the error path in this block code.
IMHO to simplify the code, you can just return true or false if you
queued it. Then if the driver is disappearing and we are still queuing
it, it will be the release that will clean up all the queues, so we
might not worry about this edge case.
Thanks,
Stefano
Any feedback is welcome!
Thanks,
Luigi