提交 e71044ee 编写于 作者: M Michal Schmidt 提交者: James Bottomley

[SCSI] sg: fix oops in the error path in sg_build_indirect()

When the allocation fails in sg_build_indirect(), an oops happens in
the error path. It's caused by an obvious typo.
Signed-off-by: NMichal Schmidt <mschmidt@redhat.com>
Reported-by: NBob Tracy <rct@gherkin.frus.com>
Acked-by: NDouglas Gilbert <dgilbert@interlog.com>
Cc: Stable Tree <stable@kernel.org>
Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
上级 b437b956
......@@ -1811,7 +1811,7 @@ sg_build_indirect(Sg_scatter_hold * schp, Sg_fd * sfp, int buff_size)
return 0;
out:
for (i = 0; i < k; i++)
__free_pages(schp->pages[k], order);
__free_pages(schp->pages[i], order);
if (--order >= 0)
goto retry;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册