Prechádzať zdrojové kódy

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>
Dan Carpenter 13 rokov pred
rodič
commit
ef6b0807e2
2 zmenil súbory, kde vykonal 3 pridanie a 2 odobranie
  1. 1 1
      include/net/9p/client.h
  2. 2 1
      net/9p/client.c

+ 1 - 1
include/net/9p/client.h

@@ -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;

+ 2 - 1
net/9p/client.c

@@ -201,7 +201,8 @@ free_and_return:
  *
  */
 
-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;