summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHua Zhong <hzhong@gmail.com>2006-04-19 15:25:02 -0700
committerDavid S. Miller <davem@davemloft.net>2006-04-19 15:25:02 -0700
commit3672558c6180ca28a7aa46765702467a37e58fc5 (patch)
tree1529de37f6139fff32de963423178c42ec6c1629
parent52824b6b5fa0533e2b2adc9df396d0e9ff6fb02a (diff)
downloadop-kernel-dev-3672558c6180ca28a7aa46765702467a37e58fc5.zip
op-kernel-dev-3672558c6180ca28a7aa46765702467a37e58fc5.tar.gz
[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>
-rw-r--r--net/socket.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/socket.c b/net/socket.c
index 23898f4..0ce12df 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);
OpenPOWER on IntegriCloud