From: Jens Axboe <jens.axboe@oracle.com>
To: Laurent Riffard <laurent.riffard@free.fr>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, Peter Osterlund <petero2@telia.com>
Subject: Re: 2.6.23-rc4-mm1: git-block.patch broke pktcdvd
Date: Fri, 14 Sep 2007 13:06:06 +0200 [thread overview]
Message-ID: <20070914110606.GJ25592@kernel.dk> (raw)
In-Reply-To: <20070914093358.GB25592@kernel.dk>
On Fri, Sep 14 2007, Jens Axboe wrote:
> On Fri, Sep 14 2007, Laurent Riffard wrote:
> > Le 10.09.2007 22:19, Laurent Riffard a écrit :
> > > Le 01.09.2007 06:58, Andrew Morton a écrit :
> > >> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.23-rc4/2.6.23-rc4-mm1/
> > > [...]
> > >
> > > Jens,
> > >
> > > git-block.patch broke pktcdvd, I've got an Oops while syncing:
> > >
> > >> [ 713.014888] pktcdvd: Fixed packets, 16 blocks, Mode-1 disc
> > >> [ 713.021844] pktcdvd: write speed 2770kB/s
> > >> [ 718.401761] pktcdvd: 4595774kB available on disc
> > >> [ 721.175644] UDF-fs INFO UDF 0.9.8.1 (2004/29/09) Mounting volume 'LinuxUDF', timestamp 2006/10/08 21:17 (1078)
> > >> [ 721.213784] mount used greatest stack depth: 460 bytes left
> > >> [ 752.634402] BUG: unable to handle kernel NULL pointer dereference at virtual address 00000000
> > >> [ 752.635711] printing eip: c017b69e *pde = 00000000
> > >> [ 752.636983] Oops: 0002 [#1] PREEMPT
> > >> [ 752.638240] last sysfs file: /devices/pci0000:00/0000:00:0d.0/modalias
> > >> [ 752.639477] Modules linked in: udf binfmt_misc pktcdvd radeon drm lp nls_iso8859_1 nls_cp850 vfat fat reiser4 lzo_decompress lzo_compress eeprom w83781d hwmon_vid snd_ens1371 gameport snd_ac97_codec ac97_bus snd_pcm_oss snd_mixer_oss snd_pcm sg firewire_ohci firewire_core sr_mod cdrom crc_itu_t snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer snd_seq_device snd 8250_pnp i2c_viapro via_agp floppy ohci1394 soundcore 8250 serial_core ata_generic uhci_hcd agpgart ne2k_pci 8390 ieee1394 snd_page_alloc rtc pcspkr via686a usbcore parport_pc parport evdev reiserfs sd_mod pata_via libata scsi_mod dm_mirror dm_mod
> > >> [ 752.645759]
> > >> [ 752.646990] Pid: 3403, comm: pktcdvd0 Not tainted (2.6.23-rc4-mm1 #50)
> > >> [ 752.648256] EIP: 0060:[__bio_add_page+212/355] EFLAGS: 00010246 CPU: 0
> > >> [ 752.649515] EIP is at __bio_add_page+0xd4/0x163
> > >> [ 752.650750] EAX: 00000000 EBX: 00000000 ECX: c26ca400 EDX: 00000000
> > >> [ 752.651984] ESI: cba3cf48 EDI: c1174be0 EBP: cb01cef4 ESP: cb01cee4
> > >> [ 752.653219] DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
> > >> [ 752.654446] Process pktcdvd0 (pid: 3403, ti=cb01c000 task=c1b9cdb0 task.ti=cb01c000)
> > >> [ 752.654526] Stack: c26ca400 cba3cf48 c1174be0 00000001 cb01cf10 c017b763 00000800 00000800
> > >> [ 752.655908] 00000040 cba3cf48 cb06e120 cb01cfd0 e1d94044 00000800 00000004 cb09b8a0
> > >> [ 752.657297] c1853ce0 00000000 00000800 00000001 00000000 00000000 00000000 00000000
> > >> [ 752.658695] Call Trace:
> > >> [ 752.661126] [show_trace_log_lvl+26/47] show_trace_log_lvl+0x1a/0x2f
> > >> [ 752.662383] [show_stack_log_lvl+155/163] show_stack_log_lvl+0x9b/0xa3
> > >> [ 752.663626] [show_registers+160/482] show_registers+0xa0/0x1e2
> > >> [ 752.664868] [die+261/567] die+0x105/0x237
> > >> [ 752.666072] [do_page_fault+1127/1349] do_page_fault+0x467/0x545
> > >> [ 752.667274] [error_code+106/112] error_code+0x6a/0x70
> > >> [ 752.668477] [bio_add_page+54/61] bio_add_page+0x36/0x3d
> > >> [ 752.669669] [<e1d94044>] kcdrwd+0x5a5/0x9ba [pktcdvd]
> > >> [ 752.670856] [kthread+57/97] kthread+0x39/0x61
> > >> [ 752.672024] [kernel_thread_helper+7/16] kernel_thread_helper+0x7/0x10
> > >> [ 752.673197] =======================
> > >> [ 752.674336] Code: ba 01 00 00 00 8b 4d f0 8b 46 18 66 3b 81 50 01 00 00 73 da 66 8b 46 1a 66 3b 81 52 01 00 00 73 cd 0f
> > >> b7 46 14 6b d8 0c 03 5e 2c <89> 3b 8b 45 08 89 43 04 8b 4d 0c 89 4b 08 8b 45 f0 8b 78 68 85
> > >> [ 752.677879] EIP: [__bio_add_page+212/355] __bio_add_page+0xd4/0x163 SS:ESP 0068:cb01cee4
> >
> > I dig through git-block.patch and the culprit seems to be commit
> > c94f1c4ac87862675c8d70941973bc3a69aff5d8 "bio: use memset() in
> > bio_init()".
> >
> > Maybe the real bug is a bad bio initialization in pktcdvd driver,
> > which is revealed by this commit ?
>
> At least pktcdvd doesn't expect bio->bi_io_vec[] to be cleared, that's
> why it's oopsing now. I'll revert this bit for now, thanks for the
> report.
Rethinking this, I think bio_init() is doing the right thing, only
pktcdvd seems to rely on it preserving some members. So I'd rather fixup
pktcdvd instead.
Does this work for you?
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index fadbfd8..98343a1 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -1142,16 +1142,20 @@ static void pkt_gather_data(struct pktcdvd_device *pd, struct packet_data *pkt)
* Schedule reads for missing parts of the packet.
*/
for (f = 0; f < pkt->frames; f++) {
+ struct bio_vec *vec;
+
int p, offset;
if (written[f])
continue;
bio = pkt->r_bios[f];
+ vec = bio->bi_io_vec;
bio_init(bio);
bio->bi_max_vecs = 1;
bio->bi_sector = pkt->sector + f * (CD_FRAMESIZE >> 9);
bio->bi_bdev = pd->bdev;
bio->bi_end_io = pkt_end_io_read;
bio->bi_private = pkt;
+ bio->bi_io_vec = vec;
p = (f * CD_FRAMESIZE) / PAGE_SIZE;
offset = (f * CD_FRAMESIZE) % PAGE_SIZE;
@@ -1448,6 +1452,7 @@ static void pkt_start_write(struct pktcdvd_device *pd, struct packet_data *pkt)
pkt->w_bio->bi_bdev = pd->bdev;
pkt->w_bio->bi_end_io = pkt_end_io_packet_write;
pkt->w_bio->bi_private = pkt;
+ pkt->w_bio->bi_io_vec = bvec;
for (f = 0; f < pkt->frames; f++)
if (!bio_add_page(pkt->w_bio, bvec[f].bv_page, CD_FRAMESIZE, bvec[f].bv_offset))
BUG();
--
Jens Axboe
next prev parent reply other threads:[~2007-09-14 11:06 UTC|newest]
Thread overview: 153+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-01 4:58 2.6.23-rc4-mm1 Andrew Morton
2007-09-01 6:53 ` 2.6.23-rc4-mm1 KAMEZAWA Hiroyuki
2007-09-01 6:58 ` 2.6.23-rc4-mm1 Andrew Morton
2007-09-01 8:54 ` 2.6.23-rc4-mm1 Herbert Xu
2007-09-01 21:09 ` 2.6.23-rc4-mm1 Satyam Sharma
2007-09-02 1:46 ` 2.6.23-rc4-mm1 Herbert Xu
2007-09-02 2:52 ` 2.6.23-rc4-mm1 Satyam Sharma
2007-09-02 3:59 ` 2.6.23-rc4-mm1 Herbert Xu
2007-09-01 11:55 ` 2.6.23-rc4-mm1 Kamalesh Babulal
2007-09-01 14:18 ` 2.6.23-rc4-mm1: geode fb compile error Adrian Bunk
2007-09-01 17:03 ` Satyam Sharma
2007-09-01 15:19 ` 2.6.23-rc4-mm1: two ktime_sub_ns() functions Adrian Bunk
2007-09-01 15:44 ` 2.6.23-rc4-mm1: mips compile error Adrian Bunk
2007-09-04 5:27 ` Mathieu Desnoyers
2007-09-04 10:21 ` Ralf Baechle
2007-09-01 16:07 ` 2.6.23-rc4-mm1 Torsten Kaiser
2007-09-01 16:16 ` 2.6.23-rc4-mm1 Andrew Morton
2007-09-01 18:13 ` 2.6.23-rc4-mm1 OOPS in forcedeth? thunder7
2007-09-01 19:05 ` Jeff Garzik
2007-09-02 0:54 ` Satyam Sharma
2007-09-02 5:36 ` thunder7
2007-09-02 6:19 ` thunder7
2007-09-02 9:55 ` Satyam Sharma
2007-09-14 3:51 ` Andrew James Wade
2007-09-17 13:57 ` Dhaval Giani
2007-09-17 14:07 ` Denis V. Lunev
2007-09-17 21:00 ` Vlad Yasevich
2007-09-17 23:56 ` Satyam Sharma
2007-09-01 22:06 ` 2.6.23-rc4-mm1 "no CRC" MODPOST warnings Satyam Sharma
2007-09-01 22:40 ` Adrian Bunk
2007-09-01 23:15 ` Sam Ravnborg
2007-09-01 23:12 ` [PATCH -mm] softlockup-improve-debug-output.patch fix Satyam Sharma
2007-09-02 12:37 ` [PATCH -mm][resend] " Satyam Sharma
2007-09-02 12:28 ` Ingo Molnar
2007-09-06 6:52 ` [PATCH] sched: Use show_regs() to improve __schedule_bug() output Satyam Sharma
2007-10-22 12:35 ` Ingo Molnar
2007-09-03 16:36 ` [PATCH -mm][resend] softlockup-improve-debug-output.patch fix Valdis.Kletnieks
2007-09-01 23:42 ` [PATCH -mm] drivers/acpi/tables/tbutils.c: Shut up bogus uninitialized variable warning Satyam Sharma
2007-09-02 0:19 ` Adrian Bunk
2007-09-02 1:02 ` Satyam Sharma
2007-09-02 1:30 ` [PATCH -mm] net/sched/sch_cbq.c: Shut up " Satyam Sharma
2007-09-02 11:36 ` Patrick McHardy
2007-09-02 2:36 ` 2.6.23-rc4-mm1: unpingable box and NULL dereference at tcp_rto_min() Alexey Dobriyan
2007-09-02 5:02 ` Satyam Sharma
2007-09-02 20:52 ` Andrew Morton
2007-09-02 21:19 ` Alexey Dobriyan
2007-09-02 9:14 ` 2.6.23-rc4-mm1 net bitops compile error Adrian Bunk
2007-09-04 17:53 ` Jiri Slaby
2007-09-02 11:25 ` [-mm patch] IPV6 must select XFRM Adrian Bunk
2007-09-03 10:43 ` Masahide NAKAMURA
2007-09-06 10:01 ` net-26.24 broken with XFRM off Noriaki TAKAMIYA
2007-09-02 13:00 ` [PATCH -mm] drivers/char/nozomi.c: __devexit_p usage build fix Satyam Sharma
2007-09-02 19:01 ` 2.6.23-rc4-mm1: broke pata_via cable detection Laurent Riffard
2007-09-02 19:20 ` Alan Cox
2007-09-11 1:50 ` Jeff Garzik
2007-09-02 20:39 ` 2.6.23-rc4-mm1: boot failure on HPC nx6325 Rafael J. Wysocki
2007-09-03 8:36 ` Thomas Gleixner
2007-09-03 10:15 ` Rafael J. Wysocki
2007-09-03 20:51 ` Rafael J. Wysocki
2007-09-04 1:03 ` Thomas Gleixner
2007-09-03 4:30 ` 2.6.23-rc4-mm1 Randy Dunlap
2007-09-03 19:25 ` 2.6.23-rc4-mm1 Wim Van Sebroeck
2007-09-03 22:32 ` 2.6.23-rc4-mm1 Satyam Sharma
2007-09-04 21:21 ` 2.6.23-rc4-mm1 Wim Van Sebroeck
2007-09-04 17:54 ` 2.6.23-rc4-mm1 Zach Carter
2007-09-04 21:36 ` 2.6.23-rc4-mm1 Stephen Hemminger
2007-09-05 14:37 ` 2.6.23-rc4-mm1 Valdis.Kletnieks
2007-09-05 15:12 ` 2.6.23-rc4-mm1 Andrew Morton
2007-09-05 15:20 ` 2.6.23-rc4-mm1 Balbir Singh
2007-09-05 15:58 ` 2.6.23-rc4-mm1 Valdis.Kletnieks
2007-09-05 19:46 ` 2.6.23-rc4-mm1 - git-alsa.patch breaks audio on Dell Latitude D820 Valdis.Kletnieks
2007-09-05 19:54 ` Valdis.Kletnieks
2007-09-05 20:22 ` Takashi Iwai
2007-09-05 20:11 ` Takashi Iwai
2007-09-05 20:27 ` Takashi Iwai
2007-09-05 21:16 ` Valdis.Kletnieks
2007-09-05 21:39 ` Takashi Iwai
2007-09-06 14:10 ` Valdis.Kletnieks
2007-09-06 14:17 ` Takashi Iwai
2007-09-06 19:37 ` 2.6.23-rc4-mm1 myri10ge module link error on x86_64 Mathieu Desnoyers
2007-09-06 20:40 ` David Miller
2007-09-06 20:48 ` David Miller
2007-09-07 23:59 ` Jeff Garzik
2007-09-08 0:25 ` Daniel Walker
2007-10-13 22:03 ` Avuton Olrich
2007-09-09 12:22 ` 2.6.23-rc4-mm1 Mel Gorman
2007-09-14 15:12 ` ath5k driver not working on ThinkPad Robert de Rooy
2007-09-09 20:24 ` [-mm patch] alpha bitops.h must #include <asm/barrier.h> Adrian Bunk
2007-09-09 20:24 ` [-mm patch] remove ide_get_error_location() Adrian Bunk
2007-09-11 21:27 ` Bartlomiej Zolnierkiewicz
2007-09-12 5:54 ` Jens Axboe
2007-09-09 20:24 ` [-mm patch] drivers/dma/ioat_dma.c: make 3 functions static Adrian Bunk
2007-09-09 20:25 ` [-mm patch] usb/serial/ch341.c: make 4 " Adrian Bunk
2007-09-09 20:25 ` [-mm patch] make nfs_wb_page_priority() static Adrian Bunk
2007-09-09 20:25 ` [-mm patch] kernel/kexec.c: make code static Adrian Bunk
2007-09-10 2:55 ` Ken'ichi Ohmichi
2007-09-10 12:20 ` Adrian Bunk
2007-09-11 5:53 ` Maneesh Soni
2007-09-12 7:37 ` Ken'ichi Ohmichi
2007-09-09 20:25 ` [-mm patch] really unexport do_softirq Adrian Bunk
2007-09-12 13:14 ` David Miller
2007-09-09 20:25 ` [-mm patch] unexport raise_softirq_irqoff Adrian Bunk
2007-09-09 20:41 ` Christoph Hellwig
2007-09-12 13:15 ` David Miller
2007-09-09 20:25 ` [-mm patch] mm/memcontrol.c: clenups Adrian Bunk
2007-09-10 8:23 ` Balbir Singh
2007-09-10 19:58 ` Jan Engelhardt
2007-09-10 19:59 ` Jan Engelhardt
2007-09-10 21:59 ` Adrian Bunk
2007-09-11 2:41 ` Balbir Singh
2007-09-09 20:25 ` [-mm patch] net/sctp/socket.c: make 3 variables static Adrian Bunk
2007-09-10 14:05 ` [Lksctp-developers] " Neil Horman
2007-09-12 13:18 ` David Miller
2007-09-09 20:25 ` [-mm patch] make tcp_splice_data_recv() static Adrian Bunk
2007-09-12 13:21 ` David Miller
2007-09-12 17:44 ` Jens Axboe
2007-09-09 20:26 ` [-mm patch] make do_try_to_free_pages() static Adrian Bunk
2007-09-10 8:24 ` Balbir Singh
2007-09-10 17:43 ` 2.6.23-rc4-mm1 -- powerpc per_cpu__cpu_sibling_map compile failure Andy Whitcroft
2007-09-10 17:49 ` 2.6.23-rc4-mm1 Andy Whitcroft
2007-09-10 18:19 ` 2.6.23-rc4-mm1 Andrew Morton
2007-09-10 18:59 ` 2.6.23-rc4-mm1 Torsten Kaiser
2007-09-10 19:20 ` 2.6.23-rc4-mm1 Andrew Morton
2007-09-10 19:38 ` 2.6.23-rc4-mm1 Torsten Kaiser
2007-09-10 19:42 ` 2.6.23-rc4-mm1 FUJITA Tomonori
2007-09-10 20:43 ` 2.6.23-rc4-mm1 Torsten Kaiser
2007-09-11 8:32 ` 2.6.23-rc4-mm1 Jens Axboe
2007-09-10 19:10 ` 2.6.23-rc4-mm1 FUJITA Tomonori
2007-09-13 17:34 ` 2.6.23-rc4-mm1 Andy Whitcroft
2007-09-15 4:16 ` 2.6.23-rc4-mm1 Paul Jackson
2007-09-15 10:52 ` 2.6.23-rc4-mm1 FUJITA Tomonori
2007-09-17 13:28 ` 2.6.23-rc4-mm1 Jens Axboe
2007-09-17 14:32 ` 2.6.23-rc4-mm1 FUJITA Tomonori
2007-09-18 10:18 ` 2.6.23-rc4-mm1 Jens Axboe
2007-09-18 12:25 ` 2.6.23-rc4-mm1 FUJITA Tomonori
2007-09-18 12:51 ` 2.6.23-rc4-mm1 Jens Axboe
2007-09-10 19:31 ` 2.6.23-rc4-mm1 FUJITA Tomonori
2007-09-14 8:10 ` 2.6.23-rc4-mm1 Andy Whitcroft
2007-09-14 13:01 ` 2.6.23-rc4-mm1 Torsten Kaiser
2007-09-14 20:15 ` 2.6.23-rc4-mm1 Andrew Morton
2007-09-10 20:19 ` 2.6.23-rc4-mm1: git-block.patch broke pktcdvd Laurent Riffard
2007-09-13 22:50 ` Laurent Riffard
2007-09-13 23:05 ` Andrew Morton
2007-09-14 8:00 ` Jens Axboe
2007-09-14 8:30 ` Jens Axboe
2007-09-14 9:33 ` Jens Axboe
2007-09-14 11:06 ` Jens Axboe [this message]
2007-09-14 19:04 ` Laurent Riffard
2007-09-20 21:25 ` [PATCH] pktcdvd: don't rely on bio_init() preserving bio->bi_destructor Laurent Riffard
2007-09-21 5:19 ` Jens Axboe
2007-09-06 7:25 net-26.24 broken with XFRM off Divy Le Ray
2007-09-06 8:13 ` Eric Dumazet
2007-09-06 9:50 ` David Miller
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=20070914110606.GJ25592@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=laurent.riffard@free.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=petero2@telia.com \
/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
Powered by JetHome