Messages in this thread Patch in this message | | | Date | Wed, 16 Sep 2009 15:28:21 -0700 | From | Greg KH <> | Subject | [patch 02/24] [SCSI] sg: fix oops in the error path in sg_build_indirect() |
| |
2.6.30-stable review patch. If anyone has any objections, please let us know.
------------------ From: Michal Schmidt <mschmidt@redhat.com>
commit e71044ee2efa4792e21d243b03d49006db66aec9 upstream.
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: Michal Schmidt <mschmidt@redhat.com> Reported-by: Bob Tracy <rct@gherkin.frus.com> Acked-by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- drivers/scsi/sg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -1811,7 +1811,7 @@ retry: 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;
| |