diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-07-21 23:34:31 +0200 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-07-21 23:34:31 +0200 |
commit | 088eb2a84b3b093af60bbe0b65151e8a9cd2d57d (patch) | |
tree | 8f145d8c71f6e249d6664b5482ac216b8c6e4016 /net/9p | |
parent | 6217a69a1e38807b3046b4fd6e4bf413e0e03b67 (diff) | |
parent | 84a1caf1453c3d44050bd22db958af4a7f99315c (diff) |
Merge tag 'v3.5-rc7' into late/soc
Linux 3.5-rc7
Diffstat (limited to 'net/9p')
-rw-r--r-- | net/9p/protocol.c | 2 | ||||
-rw-r--r-- | net/9p/trans_virtio.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/net/9p/protocol.c b/net/9p/protocol.c index 9ee48cb30179..3d33ecf13327 100644 --- a/net/9p/protocol.c +++ b/net/9p/protocol.c @@ -368,7 +368,7 @@ p9pdu_vwritef(struct p9_fcall *pdu, int proto_version, const char *fmt, const char *sptr = va_arg(ap, const char *); uint16_t len = 0; if (sptr) - len = min_t(uint16_t, strlen(sptr), + len = min_t(size_t, strlen(sptr), USHRT_MAX); errcode = p9pdu_writef(pdu, proto_version, diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index 5af18d11b518..2a167658bb95 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c @@ -192,10 +192,10 @@ static int pack_sg_list(struct scatterlist *sg, int start, s = rest_of_page(data); if (s > count) s = count; + BUG_ON(index > limit); sg_set_buf(&sg[index++], data, s); count -= s; data += s; - BUG_ON(index > limit); } return index-start; |