From: Michael S. Tsirkin Date: Mon, 26 Jul 2010 07:25:30 +0000 (+0930) Subject: virtio: fix oops on OOM X-Git-Tag: v2.6.35~40 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1fe9b6fef11771461e69ecd1bc8935a1c7c90cb5;p=pandora-kernel.git 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 Signed-off-by: Michael S. Tsirkin Signed-off-by: Rusty Russell Tested-by: Chris Mason Cc: stable@kernel.org # .34.x Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed