summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorHua Zhong <hzhong@gmail.com>2006-04-20 02:25:02 +0400
committerDavid S. Miller <davem@davemloft.net>2006-04-20 02:25:02 +0400
commit3672558c6180ca28a7aa46765702467a37e58fc5 (patch)
tree1529de37f6139fff32de963423178c42ec6c1629 /net
parent52824b6b5fa0533e2b2adc9df396d0e9ff6fb02a (diff)
downloadlinux-3672558c6180ca28a7aa46765702467a37e58fc5.tar.xz
[NET]: sockfd_lookup_light() returns random error for -EBADFD
This applies to 2.6.17-rc2. There is a missing initialization of err in sockfd_lookup_light() that could return random error for an invalid file handle. Signed-off-by: Hua Zhong <hzhong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/socket.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/socket.c b/net/socket.c
index 23898f45f713..0ce12dfc7a71 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -490,6 +490,7 @@ static struct socket *sockfd_lookup_light(int fd, int *err, int *fput_needed)
struct file *file;
struct socket *sock;
+ *err = -EBADF;
file = fget_light(fd, fput_needed);
if (file) {
sock = sock_from_file(file, err);