Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b85f7d92 authored by Eric Van Hensbergen's avatar Eric Van Hensbergen
Browse files

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: default avatarNatalie Orlin <norlin@us.ibm.com>
Signed-off-by: default avatarEric Van Hensbergen <ericvh@gmail.com>
parent bbd9d6f7
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;