From: Douglas Gilbert <dgilbert@interlog.com>
To: Michal Schmidt <mschmidt@redhat.com>
Cc: linux-scsi@vger.kernel.org, Bob Tracy <rct@gherkin.frus.com>,
linux-kernel@vger.kernel.org, stable@kernel.org
Subject: Re: [PATCH] sg: fix oops in the error path in sg_build_indirect()
Date: Thu, 03 Sep 2009 09:54:37 -0400 [thread overview]
Message-ID: <4A9FCA9D.8010702@interlog.com> (raw)
In-Reply-To: <20090903142708.0b820ca1@leela>
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>
next prev parent reply other threads:[~2009-09-03 13:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 [this message]
2009-09-03 14:41 ` Bob Tracy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A9FCA9D.8010702@interlog.com \
--to=dgilbert@interlog.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mschmidt@redhat.com \
--cc=rct@gherkin.frus.com \
--cc=stable@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox