diff options
author | Eric Van Hensbergen <ericvh@gmail.com> | 2011-07-13 19:12:18 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-10-03 11:40:16 -0700 |
commit | 7b551b70695eb39e8bfcc29ae9883e66254cb12d (patch) | |
tree | 066d0d074908159c05d6dfd3b96a1269bb6e931d /net/9p | |
parent | f2685ef0fbc5fff0a8f1cdc204bf37ab0c9a04a7 (diff) |
net/9p: fix client code to fail more gracefully on protocol error
commit b85f7d92d7bd7e3298159e8b1eed8cb8cbbb0348 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net/9p')
-rw-r--r-- | net/9p/client.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/9p/client.c b/net/9p/client.c index 9e3b0e640da1..ffaf0df6e304 100644 --- 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; |