projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
52824b6
)
[NET]: sockfd_lookup_light() returns random error for -EBADFD
author
Hua Zhong
<hzhong@gmail.com>
Wed, 19 Apr 2006 22:25:02 +0000
(15:25 -0700)
committer
David S. Miller
<davem@davemloft.net>
Wed, 19 Apr 2006 22:25:02 +0000
(15:25 -0700)
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>
net/socket.c
patch
|
blob
|
history
diff --git
a/net/socket.c
b/net/socket.c
index
23898f4
..
0ce12df
100644
(file)
--- 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);