Loading net/socket.c +7 −6 Original line number Original line Diff line number Diff line Loading @@ -450,16 +450,17 @@ EXPORT_SYMBOL(sockfd_lookup); static struct socket *sockfd_lookup_light(int fd, int *err, int *fput_needed) static struct socket *sockfd_lookup_light(int fd, int *err, int *fput_needed) { { struct file *file; struct fd f = fdget(fd); struct socket *sock; struct socket *sock; *err = -EBADF; *err = -EBADF; file = fget_light(fd, fput_needed); if (f.file) { if (file) { sock = sock_from_file(f.file, err); sock = sock_from_file(file, err); if (likely(sock)) { if (sock) *fput_needed = f.flags; return sock; return sock; fput_light(file, *fput_needed); } fdput(f); } } return NULL; return NULL; } } Loading Loading
net/socket.c +7 −6 Original line number Original line Diff line number Diff line Loading @@ -450,16 +450,17 @@ EXPORT_SYMBOL(sockfd_lookup); static struct socket *sockfd_lookup_light(int fd, int *err, int *fput_needed) static struct socket *sockfd_lookup_light(int fd, int *err, int *fput_needed) { { struct file *file; struct fd f = fdget(fd); struct socket *sock; struct socket *sock; *err = -EBADF; *err = -EBADF; file = fget_light(fd, fput_needed); if (f.file) { if (file) { sock = sock_from_file(f.file, err); sock = sock_from_file(file, err); if (likely(sock)) { if (sock) *fput_needed = f.flags; return sock; return sock; fput_light(file, *fput_needed); } fdput(f); } } return NULL; return NULL; } } Loading