aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorEric Van Hensbergen <ericvh@gmail.com>2011-07-13 19:12:18 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-07 12:31:59 -0800
commitfd319bb5c7fbe886389e19f8c530ee9a644f9619 (patch)
tree925b94284bfd91d6540f22d6919e17d56048578d /net
parentc28f366a6ef9b6e14e069e7d750c32d73544444e (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')
-rw-r--r--net/9p/client.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/9p/client.c b/net/9p/client.c
index 8af95b2dddd..13a0682b341 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -221,7 +221,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;