* [PATCH] sg: fix oops in the error path in sg_build_indirect() [not found] <20090903033945.GA20755@gherkin.frus.com> @ 2009-09-03 12:27 ` Michal Schmidt 2009-09-03 13:54 ` Douglas Gilbert 2009-09-03 14:41 ` Bob Tracy 0 siblings, 2 replies; 3+ messages in thread From: Michal Schmidt @ 2009-09-03 12:27 UTC (permalink / raw) To: linux-scsi; +Cc: Bob Tracy, linux-kernel, stable 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> --- diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 9230402..4968c4c 100644 --- 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; ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] sg: fix oops in the error path in sg_build_indirect() 2009-09-03 12:27 ` [PATCH] sg: fix oops in the error path in sg_build_indirect() Michal Schmidt @ 2009-09-03 13:54 ` Douglas Gilbert 2009-09-03 14:41 ` Bob Tracy 1 sibling, 0 replies; 3+ messages in thread From: Douglas Gilbert @ 2009-09-03 13:54 UTC (permalink / raw) To: Michal Schmidt; +Cc: linux-scsi, Bob Tracy, linux-kernel, stable Michal Schmidt wrote: > 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> > --- > > diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c > index 9230402..4968c4c 100644 > --- 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; > -- Ouch. Signed-off-by: Douglas Gilbert <dgilbert@interlog.com> ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] sg: fix oops in the error path in sg_build_indirect() 2009-09-03 12:27 ` [PATCH] sg: fix oops in the error path in sg_build_indirect() Michal Schmidt 2009-09-03 13:54 ` Douglas Gilbert @ 2009-09-03 14:41 ` Bob Tracy 1 sibling, 0 replies; 3+ messages in thread From: Bob Tracy @ 2009-09-03 14:41 UTC (permalink / raw) To: Michal Schmidt; +Cc: linux-scsi, linux-kernel, stable On Thu, Sep 03, 2009 at 02:27:08PM +0200, Michal Schmidt wrote: > 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> ACK, and thanks. --Bob ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-09-03 14:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20090903033945.GA20755@gherkin.frus.com>
2009-09-03 12:27 ` [PATCH] sg: fix oops in the error path in sg_build_indirect() Michal Schmidt
2009-09-03 13:54 ` Douglas Gilbert
2009-09-03 14:41 ` Bob Tracy
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox