mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "James Lamanna" <jlamanna@gmail.com>
To: "Kai Makisara" <Kai.Makisara@kolumbus.fi>
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	"Mike Christie" <michaelc@cs.wisc.edu>,
	"Bryan Holty" <lgeek@frontiernet.net>
Subject: Re: [OOPS] amrestore dies in kmem_cache_free 2.6.16.18 - cannot restore backups!
Date: Sun, 28 May 2006 15:04:20 -0700	[thread overview]
Message-ID: <aa4c40ff0605281504w522953f5x63686e898c3a3bc3@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.63.0605271202110.10358@kai.makisara.local>

On 5/27/06, Kai Makisara <Kai.Makisara@kolumbus.fi> wrote:

[SNIP]

>
>
> Next thing was to patch 2.6.16.18 with the patch at the end: No more
> oopses with any alignment.
>
> James, does this fix your problem ?

Kai-
I'll try and see if I can test this on Tuesday.
I've been traveling for the last few days.

Thanks for your help!

-- James


>
> Kai
>
> --------------------------------8<------------------------------------------
>
> Excerpt from a message from Brian Holty to linux-scsi and linux-kernel on
> Wed, 22 Mar 2006 06:35:39:
>
> ...
> Based on above, I think the most intuitive fix would be the offset addition of
> the first entry to the initialization of nr_pages.
>
> Without this change, for instance, with 4K io's every sg io that is
> dma_aligned for direct io, but not page aligned will cause slab corruption
> and an oops
>
> I am able to run a number of tests with sg that cause the boundary to be
> crossed, and with this fix there is no slab corruption or data corruption.
>
> Thanks Dan, I had been hunting for this for a couple of days!!
>
> Thoughts??
>
> Signed-off-by: Bryan Holty <lgeek@frontiernet.net>
>
>  --- a/drivers/scsi/scsi_lib.c  2006-03-03 13:17:22.000000000 -0600
> +++ b/drivers/scsi/scsi_lib.c   2006-03-22 06:09:09.669599539 -0600
> @@ -368,7 +368,7 @@
>                            int nsegs, unsigned bufflen, gfp_t gfp)
>  {
>         struct request_queue *q = rq->q;
> -       int nr_pages = (bufflen + PAGE_SIZE - 1) >> PAGE_SHIFT;
> +       int nr_pages = (bufflen + sgl[0].offset + PAGE_SIZE - 1) >> PAGE_SHIFT;
>         unsigned int data_len = 0, len, bytes, off;
>         struct page *page;
>         struct bio *bio = NULL;
>

  reply	other threads:[~2006-05-28 22:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-24  1:24 James Lamanna
2006-05-24  7:38 ` Pekka Enberg
2006-05-25 20:02 ` Kai Makisara
2006-05-27  9:34   ` Kai Makisara
2006-05-28 22:04     ` James Lamanna [this message]
2006-05-30 15:17     ` James Lamanna
2006-05-26  4:27 Chuck Ebbert
2006-05-27 15:22 ` Mike Christie

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=aa4c40ff0605281504w522953f5x63686e898c3a3bc3@mail.gmail.com \
    --to=jlamanna@gmail.com \
    --cc=Kai.Makisara@kolumbus.fi \
    --cc=lgeek@frontiernet.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michaelc@cs.wisc.edu \
    /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

all inboxes | Powered by JetHome®