diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2010-07-26 03:25:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-07-26 11:05:31 -0400 |
commit | 1fe9b6fef11771461e69ecd1bc8935a1c7c90cb5 (patch) | |
tree | 3ecc82deed99dc11c67d64bfea2737fc68d769d3 /drivers/base | |
parent | 2e65a2075cc740b485ab203430bdf3459d5551b6 (diff) |
virtio: fix oops on OOM
virtio ring was changed to return an error code on OOM,
but one caller was missed and still checks for vq->vring.num.
The fix is just to check for <0 error code.
Long term it might make sense to change goto add_head to
just return an error on oom instead, but let's apply
a minimal fix for 2.6.35.
Reported-by: Chris Mason <chris.mason@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Tested-by: Chris Mason <chris.mason@oracle.com>
Cc: stable@kernel.org # .34.x
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/base')
0 files changed, 0 insertions, 0 deletions