From: Dan Carpenter <hidden> Date: 2011-08-26 17:00:00
The size of things should be unsigned because negative sizes are
silly. My concern is the the limit checks don't take negative values
into consideration in p9_client_create()
if (clnt->msize > clnt->trans_mod->maxsize)
clnt->msize = clnt->trans_mod->maxsize;
and in p9_tag_alloc()
int alloc_msize = min(c->msize, max_size);
I don't know if this is exported to user space? Hopefully it's not
too late to change this.
Signed-off-by: Dan Carpenter <redacted>
On Fri, 26 Aug 2011 19:57:40 +0300, Dan Carpenter [off-list ref] wrote:
The size of things should be unsigned because negative sizes are
silly. My concern is the the limit checks don't take negative values
into consideration in p9_client_create()
if (clnt->msize > clnt->trans_mod->maxsize)
clnt->msize = clnt->trans_mod->maxsize;
and in p9_tag_alloc()
int alloc_msize = min(c->msize, max_size);
I don't know if this is exported to user space? Hopefully it's not
too late to change this.
The change is also needed to make sure large msize value (429496729) works
Without the change it cause a server crash with Qemu 9p server.
The size of things should be unsigned because negative sizes are
silly. My concern is the the limit checks don't take negative values
into consideration in p9_client_create()
if (clnt->msize> clnt->trans_mod->maxsize)
clnt->msize = clnt->trans_mod->maxsize;
and in p9_tag_alloc()
int alloc_msize = min(c->msize, max_size);
I don't know if this is exported to user space? Hopefully it's not
too late to change this.
It is not exported to user space but the other way is true;
msize can be populate from mount option. It should be fine.