提交 b85f7d92 编写于 作者: E Eric Van Hensbergen

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: NNatalie Orlin <norlin@us.ibm.com>
Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
上级 bbd9d6f7
...@@ -280,7 +280,8 @@ struct p9_req_t *p9_tag_lookup(struct p9_client *c, u16 tag) ...@@ -280,7 +280,8 @@ struct p9_req_t *p9_tag_lookup(struct p9_client *c, u16 tag)
* buffer to read the data into */ * buffer to read the data into */
tag++; tag++;
BUG_ON(tag >= c->max_tag); if(tag >= c->max_tag)
return NULL;
row = tag / P9_ROW_MAXTAG; row = tag / P9_ROW_MAXTAG;
col = tag % P9_ROW_MAXTAG; col = tag % P9_ROW_MAXTAG;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册