libkrunfw icon indicating copy to clipboard operation
libkrunfw copied to clipboard

Locking issue in `tsi_release`

Open justxuewei opened this issue 1 year ago • 1 comments

I don't see anywhere to acquire lock in tsi_release, but the lock is released in the end. Is it right?

static int tsi_release(struct socket *sock)
{
    // ...
    release_sock(sk);
}

justxuewei avatar Dec 03 '24 03:12 justxuewei

Another issue is that sock_alloc() allocates socket and inode, calling sock->ops->release() is not enough to release all resources, calling sock_release() instead.

justxuewei avatar Dec 20 '24 08:12 justxuewei