projects
/
openwrt
/
staging
/
blogic.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 23898f45f7137d2da995ebe8c89784e1deefaf13..0ce12dfc7a71651cd1d3c49f8d7881da14a02020 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);