From: Pierre Ossman <drzeus-p3sGCRWkH8CeZLLa646FqQ@public•gmane.org>
To: Tejun Heo <htejun-Re5JQEeQqe8AvxtiuMwx3w@public•gmane.org>
Cc: "Rafael J. Wysocki" <rjw-KKrjLPT3xs0@public•gmane.org>,
James Bottomley
<James.Bottomley-JuX6DAaQMKPCXq6kfMZ53/egYHeGw8Jk@public•gmane.org>,
Stephen Rothwell <sfr-3FnU+UHB4dNDw9hX6IcOSA@public•gmane.org>,
linux-next-u79uwXL29TY76Z2rM5mHXA@public•gmane.org,
LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public•gmane.org>,
Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public•gmane.org>,
Kernel Testers List
<kernel-testers-u79uwXL29TY76Z2rM5mHXA@public•gmane.org>,
scsi <linux-scsi-u79uwXL29TY76Z2rM5mHXA@public•gmane.org>,
Jens Axboe <jens.axboe-QHcLZuEGTsvQT0dZR+AlfA@public•gmane.org>,
linux-ide <linux-ide-u79uwXL29TY76Z2rM5mHXA@public•gmane.org>,
Jeff Garzik <jeff-o2qLIJkoznsdnm+yROfE0A@public•gmane.org>,
Takashi Iwai <tiwai-l3A5Bk7waGM@public•gmane.org>,
tino.keitel-Mmb7MZpHnFY@public•gmane.org
Subject: Re: linux-next: Tree for July 16 (crash on quad core AMD)
Date: Sat, 19 Jul 2008 00:47:36 +0200 [thread overview]
Message-ID: <20080719004736.626ef169@mjolnir.drzeus.cx> (raw)
In-Reply-To: <48808EE0.2060603-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1718 bytes --]
On Fri, 18 Jul 2008 21:38:56 +0900
Tejun Heo <htejun-Re5JQEeQqe8AvxtiuMwx3w@public•gmane.org> wrote:
>
> The offending commit was 83e7d317cef3ee624886f128401a72e414c0a99d
> which implements sg iterator but it forgot to add offset to the
> kmapped address and copy goes out of bounds. Takashi, this could also
> be the problem you were seeing if you don't have slab debugging turned
> on.
>
Oops, sorry. This thing wasn't supposed to go out and mess with anyone
else's tree quite yet. I'll make sure to clean out my -next tree right
away.
> The implemented iterator didn't look too pretty and the usage was
> quite awkward involving a callback and end condition check distributed
> between the callback and the outer user who runs the loop. For
> copying, end of buffer condition was tested by testing whether the
> callback returned 0 copied bytes for the iteration but AFAIK there's
> no restriction against zero length sg entry in the middle and it will
> terminate the copying prematurely.
>
> So, I implemented slightly different version which follows below.
>
I just have one objection to your version, and that is that it cannot
be used to nibble away at the sg list. The _next() call jumps an entire
page, whereas you sometimes need to consume that page in two different
sweeps. This could be handled by some external buffer that keeps the
remainder of the page, but the point of these functions was to keep
things simple for the callers.
Rgds
--
-- Pierre Ossman
WARNING: This correspondence is being monitored by the
Swedish government. Make sure your server uses encryption
for SMTP traffic and consider using PGP for end-to-end
encryption.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2008-07-18 22:47 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-16 13:50 linux-next: Tree for July 16 Stephen Rothwell
2008-07-16 18:15 ` Takashi Iwai
2008-07-16 22:53 ` linux-next: Tree for July 16 (crash on quad core AMD) Rafael J. Wysocki
2008-07-16 23:01 ` James Bottomley
[not found] ` <1216249292.3358.66.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2008-07-16 23:09 ` Rafael J. Wysocki
2008-07-18 12:38 ` Tejun Heo
[not found] ` <48808EE0.2060603-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2008-07-18 22:47 ` Pierre Ossman [this message]
2008-07-19 0:59 ` Tejun Heo
2008-07-19 1:30 ` Pierre Ossman
[not found] ` <20080719033050.552f9b49-OhHrUh4vRMSnewYJFaQfwJ5kstrrjoWp@public.gmane.org>
2008-07-19 2:12 ` Tejun Heo
2008-07-19 12:07 ` Pierre Ossman
2008-07-19 14:03 ` Tejun Heo
2008-07-20 22:40 ` Pierre Ossman
[not found] ` <20080721004033.1fc66aa3-OhHrUh4vRMSnewYJFaQfwJ5kstrrjoWp@public.gmane.org>
2008-07-21 0:38 ` Tejun Heo
[not found] ` <4883DA8C.5030306-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2008-07-21 11:32 ` Pierre Ossman
2008-07-21 15:35 ` Tejun Heo
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=20080719004736.626ef169@mjolnir.drzeus.cx \
--to=drzeus-p3sgcrwkh8cezlla646fqq@public$(echo .)gmane.org \
--cc=James.Bottomley-JuX6DAaQMKPCXq6kfMZ53/egYHeGw8Jk@public$(echo .)gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public$(echo .)gmane.org \
--cc=htejun-Re5JQEeQqe8AvxtiuMwx3w@public$(echo .)gmane.org \
--cc=jeff-o2qLIJkoznsdnm+yROfE0A@public$(echo .)gmane.org \
--cc=jens.axboe-QHcLZuEGTsvQT0dZR+AlfA@public$(echo .)gmane.org \
--cc=kernel-testers-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
--cc=linux-ide-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
--cc=linux-next-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
--cc=linux-scsi-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
--cc=rjw-KKrjLPT3xs0@public$(echo .)gmane.org \
--cc=sfr-3FnU+UHB4dNDw9hX6IcOSA@public$(echo .)gmane.org \
--cc=tino.keitel-Mmb7MZpHnFY@public$(echo .)gmane.org \
--cc=tiwai-l3A5Bk7waGM@public$(echo .)gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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