Skip to content

Commit

Permalink
fs/9p: change an int to unsigned int
Browse files Browse the repository at this point in the history
Without this msize=4294967295 will result in a crash

Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Aneesh Kumar K.V <[email protected]>
Signed-off-by: Eric Van Hensbergen <[email protected]>
  • Loading branch information
error27 authored and ericvh committed Oct 24, 2011
1 parent 4d5077f commit ef6b080
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/net/9p/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ struct p9_req_t {

struct p9_client {
spinlock_t lock; /* protect client structure */
int msize;
unsigned int msize;
unsigned char proto_version;
struct p9_trans_module *trans_mod;
enum p9_trans_status status;
Expand Down
3 changes: 2 additions & 1 deletion net/9p/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ static int parse_opts(char *opts, struct p9_client *clnt)
*
*/

static struct p9_req_t *p9_tag_alloc(struct p9_client *c, u16 tag, int max_size)
static struct p9_req_t *
p9_tag_alloc(struct p9_client *c, u16 tag, unsigned int max_size)
{
unsigned long flags;
int row, col;
Expand Down

0 comments on commit ef6b080

Please sign in to comment.