Skip to content

Commit ef6b080

Browse files
error27ericvh
authored andcommitted
fs/9p: change an int to unsigned int
Without this msize=4294967295 will result in a crash Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
1 parent 4d5077f commit ef6b080

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎include/net/9p/client.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ struct p9_req_t {
151151

152152
struct p9_client {
153153
spinlock_t lock; /* protect client structure */
154-
int msize;
154+
unsigned int msize;
155155
unsigned char proto_version;
156156
struct p9_trans_module *trans_mod;
157157
enum p9_trans_status status;

‎net/9p/client.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,8 @@ static int parse_opts(char *opts, struct p9_client *clnt)
201201
*
202202
*/
203203

204-
static struct p9_req_t *p9_tag_alloc(struct p9_client *c, u16 tag, int max_size)
204+
static struct p9_req_t *
205+
p9_tag_alloc(struct p9_client *c, u16 tag, unsigned int max_size)
205206
{
206207
unsigned long flags;
207208
int row, col;

0 commit comments

Comments
 (0)