* [PATCH] net/9p: fix client code to fail more gracefully on protocol error
@ 2011-07-14 0:15 Eric Van Hensbergen
0 siblings, 0 replies; only message in thread
From: Eric Van Hensbergen @ 2011-07-14 0:15 UTC (permalink / raw)
To: v9fs-developer; +Cc: linux-kernel, Eric Van Hensbergen
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 | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/net/9p/client.c b/net/9p/client.c
index 9e3b0e6..81e667b 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;
--
1.7.4.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-07-14 0:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-14 0:15 [PATCH] net/9p: fix client code to fail more gracefully on protocol error Eric Van Hensbergen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox