projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bbd9d6f
)
net/9p: fix client code to fail more gracefully on protocol error
author
Eric Van Hensbergen
<ericvh@gmail.com>
Thu, 14 Jul 2011 00:12:18 +0000
(19:12 -0500)
committer
Eric Van Hensbergen
<ericvh@gmail.com>
Sat, 23 Jul 2011 14:32:29 +0000
(09:32 -0500)
There was a BUG_ON to protect against a bad id which could be dealt with
more gracefully.
Reported-by: Natalie Orlin <norlin@us.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
net/9p/client.c
patch
|
blob
|
blame
|
history
diff --git
a/net/9p/client.c
b/net/9p/client.c
index 9e3b0e640da179a122f6f846bd8cff31920db159..81e667b6bbbd73a757bf1dd502f51474861afdba 100644
(file)
--- a/
net/9p/client.c
+++ b/
net/9p/client.c
@@
-280,7
+280,8
@@
struct p9_req_t *p9_tag_lookup(struct p9_client *c, u16 tag)
* buffer to read the data into */
tag++;
- BUG_ON(tag >= c->max_tag);
+ if(tag >= c->max_tag)
+ return NULL;
row = tag / P9_ROW_MAXTAG;
col = tag % P9_ROW_MAXTAG;