login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
June
»
26
Re: Oops when using growisofs
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Michael Buesch <mb@...>
To: Jens Axboe <jens.axboe@...>
Cc: Jan Kara <jack@...>, Andrew Morton <akpm@...>, Arnd Bergmann <arnd@...>, linux-kernel <linux-kernel@...>
Subject:
Re: Oops when using growisofs
Date: Thursday, June 26, 2008 - 2:39 pm
On Thursday 26 June 2008 20:36:11 Jens Axboe wrote:
quoted text
> Something like this, totally untested... > > diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c > index 68e7f19..5c1e663 100644 > --- a/drivers/ide/ide-cd.c > +++ b/drivers/ide/ide-cd.c > @@ -1308,13 +1308,29 @@ static int cdrom_read_capacity(ide_drive_t *drive, unsigned long *capacity, > req.cmd_flags |= REQ_QUIET; > > stat = ide_cd_queue_pc(drive, &req); > - if (stat == 0) { > - *capacity = 1 + be32_to_cpu(capbuf.lba); > - *sectors_per_frame = > - be32_to_cpu(capbuf.blocklen) >> SECTOR_BITS; > + if (stat) > + return stat; > + > + /* > + * Sanity check the given block size > + */ > + switch (capbuf.blocklen) { > + case 512: > + case 1024: > + case 2048: > + case 4096: > + break; > + default: > + printk(KERN_ERR "ide-cd: weird block size %u\n", > + capbuf.blocklen); > + printk(KERN_ERR "ide-cd: default to 2kb block size\n");
KERN_WARNING
quoted text
> + capbuf.blocklen = 2048; > + break; > } > > - return stat; > + *capacity = 1 + be32_to_cpu(capbuf.lba); > + *sectors_per_frame = be32_to_cpu(capbuf.blocklen) >> SECTOR_BITS; > + return 0; > } > > static int cdrom_read_tocentry(ide_drive_t *drive, int trackno, int msf_flag, >
I'll test this. Thanks a lot. :) However I cannot reproduce the bug. So I cannot tell whether it fixes it. -- Greetings Michael. --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
Oops when using growisofs
, Michael Buesch
, (Sun Jun 22, 12:18 pm)
Re: Oops when using growisofs
, Arnd Bergmann
, (Sun Jun 22, 5:22 pm)
Re: Oops when using growisofs
, Michael Buesch
, (Sun Jun 22, 6:05 pm)
Re: Oops when using growisofs
, Michael Buesch
, (Sun Jun 22, 6:28 pm)
Re: Oops when using growisofs
, Andrew Morton
, (Mon Jun 23, 2:34 am)
Re: Oops when using growisofs
, Jan Kara
, (Tue Jun 24, 1:28 pm)
Re: Oops when using growisofs
, Michael Buesch
, (Tue Jun 24, 2:39 pm)
Re: Oops when using growisofs
, Jan Kara
, (Wed Jun 25, 5:37 am)
Re: Oops when using growisofs
, Michael Buesch
, (Wed Jun 25, 5:46 am)
Re: Oops when using growisofs
, Jan Kara
, (Thu Jun 26, 1:05 pm)
Re: Oops when using growisofs
, Jens Axboe
, (Thu Jun 26, 2:11 pm)
Re: Oops when using growisofs
, Michael Buesch
, (Thu Jun 26, 2:21 pm)
Re: Oops when using growisofs
, Jens Axboe
, (Thu Jun 26, 2:36 pm)
Re: Oops when using growisofs
, Andrew Morton
, (Tue Jul 22, 5:25 am)
Re: Oops when using growisofs
, Jan Kara
, (Wed Jul 9, 2:46 pm)
Re: Oops when using growisofs
, Michael Buesch
, (Sun Jun 29, 3:39 pm)
Re: Oops when using growisofs
, Michael Buesch
, (Thu Jun 26, 2:39 pm)
Re: Oops when using growisofs
, Jens Axboe
, (Thu Jun 26, 2:41 pm)
Re: Oops when using growisofs
, Arnd Bergmann
, (Tue Jun 24, 9:42 pm)
Re: Oops when using growisofs
, Nick Piggin
, (Mon Jun 23, 2:59 am)
Re: Oops when using growisofs
, Arnd Bergmann
, (Sun Jun 22, 5:31 pm)
Re: Oops when using growisofs
, Michael Buesch
, (Sun Jun 22, 6:09 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
KOSAKI Motohiro
[bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin"
Faik Uygur
Re: Linux 2.6.21-rc1
Greg KH
[GIT PATCH] driver core patches against 2.6.24
Trent Piepho
[PATCH] [POWERPC] Improve (in|out)_beXX() asm code
git
:
linux-netdev
:
Jarek Poplawski
[PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
David Miller
[GIT]: Networking
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
Jens Axboe
Re: [BUG] New Kernel Bugs
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
2 users
and
785 guests
online.
Online users
zeekec
mikulasring
Syndicate