lkml.org 
[lkml]   [2011]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[080/244] net/9p: fix client code to fail more gracefully on protocol error
3.0-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Eric Van Hensbergen <ericvh@gmail.com>

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>

---
net/9p/client.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -280,7 +280,8 @@ struct p9_req_t *p9_tag_lookup(struct p9
* 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;



\
 
 \ /
  Last update: 2011-09-29 01:25    [from the cache]
©2003-2011 Jasper Spaans