summaryrefslogtreecommitdiffstats
path: root/Documentation/coccinelle.txt
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2010-09-14 15:15:52 +0200
committerMichael S. Tsirkin <mst@redhat.com>2010-09-14 15:22:41 +0200
commitee05d6939ed17b55e9c2466af32c208e0d547eb8 (patch)
tree72c0737e0c0ac93a9fd58970f5c5d95ca3c67914 /Documentation/coccinelle.txt
parent053d8f6622701f849fda2ca2c9ae596c13599ba9 (diff)
downloadop-kernel-dev-ee05d6939ed17b55e9c2466af32c208e0d547eb8.zip
op-kernel-dev-ee05d6939ed17b55e9c2466af32c208e0d547eb8.tar.gz
vhost-net: fix range checking in mrg bufs case
In mergeable buffer case, we use headcount, log_num and seg as indexes in same-size arrays, and we know that headcount <= seg and log_num equals either 0 or seg. Therefore, the right thing to do is range-check seg, not headcount as we do now: these will be different if guest chains s/g descriptors (this does not happen now, but we can not trust the guest). Long term, we should add BUG_ON checks to verify two other indexes are what we think they should be. Reported-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'Documentation/coccinelle.txt')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud