Commit 6a20f9f
vhost: initialize vq->nheads properly
Commit 7918bb2d19c9 ("vhost: basic in order support") introduces
vq->nheads to store the number of batched used buffers per used elem
but it forgets to initialize the vq->nheads to NULL in
vhost_dev_init() this will cause kfree() that would try to free it
without be allocated if SET_OWNER is not called.
Reported-by: JAEHOON KIM <[email protected]>
Reported-by: Breno Leitao <[email protected]>
Fixes: 45347e7 ("vhost: basic in order support")
Signed-off-by: Jason Wang <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Dawid Osuchowski <[email protected]>
Tested-by: Breno Leitao <[email protected]>
Reviewed-by: Stefano Garzarella <[email protected]>
Tested-by: Jaehoon Kim <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>1 parent 7e161a9 commit 6a20f9f
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
615 | 615 | | |
616 | 616 | | |
617 | 617 | | |
| 618 | + | |
618 | 619 | | |
619 | 620 | | |
620 | 621 | | |
| |||
0 commit comments