X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=net%2F9p%2Ftrans_virtio.c;h=2a167658bb958ae3a302bd80a46649416c697183;hb=5fcb08befaf57faa1b00e514915c1660252b8c26;hp=5af18d11b5184805bf7a01c5d94d0759b21c4992;hpb=2c13bc0f8f0d3e13b42be70bf74fec8e56b58324;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index 5af18d1..2a16765 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;