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:
887b5ea
)
net/9p: Fix crash due to bad mount parameters.
author
Abhishek Kulkarni
<
[email protected]
>
Wed, 1 Jul 2009 08:50:54 +0000
(08:50 +0000)
committer
David S. Miller
<
[email protected]
>
Thu, 2 Jul 2009 20:17:01 +0000
(13:17 -0700)
It is not safe to use match_int without checking the token type returned
by match_token (especially when the token type returned is Opt_err and
args is empty). Fix it.
Signed-off-by: Abhishek Kulkarni <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/9p/trans_fd.c
patch
|
blob
|
history
diff --git
a/net/9p/trans_fd.c
b/net/9p/trans_fd.c
index a2a1814c7a8d639d6ccd76e9fdd966b7a6431fa6..8c2588e4edc0e3bf4d329661873e1875044cade1 100644
(file)
--- a/
net/9p/trans_fd.c
+++ b/
net/9p/trans_fd.c
@@
-735,12
+735,14
@@
static int parse_opts(char *params, struct p9_fd_opts *opts)
if (!*p)
continue;
token = match_token(p, tokens, args);
- r = match_int(&args[0], &option);
- if (r < 0) {
- P9_DPRINTK(P9_DEBUG_ERROR,
- "integer field, but no integer?\n");
- ret = r;
- continue;
+ if (token != Opt_err) {
+ r = match_int(&args[0], &option);
+ if (r < 0) {
+ P9_DPRINTK(P9_DEBUG_ERROR,
+ "integer field, but no integer?\n");
+ ret = r;
+ continue;
+ }
}
switch (token) {
case Opt_port: