mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
net/9p: fix client code to fail more gracefully on protocol error
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>
This commit is contained in:
parent
bbd9d6f7fb
commit
b85f7d92d7
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue