Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b69ef7c9 authored by jiangyiwen's avatar jiangyiwen Committed by Greg Kroah-Hartman
Browse files

9p/virtio: fix off-by-one error in sg list bounds check

commit 23cba9cbde0bba05d772b335fe5f66aa82b9ad19 upstream.

Because the value of limit is VIRTQUEUE_NUM, if index is equal to
limit, it will cause sg array out of bounds, so correct the judgement
of BUG_ON.

Link: http://lkml.kernel.org/r/5B63D5F6.6080109@huawei.com


Signed-off-by: default avatarYiwen Jiang <jiangyiwen@huawei.com>
Reported-By: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarJun Piao <piaojun@huawei.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarDominique Martinet <dominique.martinet@cea.fr>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 684f5d9a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment