login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
February
»
1
Re: kernel BUG at ide-cd.c:1726 in 2.6.24-03863-g0ba6c33 && -g8561b089
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From:
Kiyoshi Ueda <k-ueda@...>
To: <petkovbb@...>, <petkovbb@...>
Cc: <jens.axboe@...>, <nai.xia@...>, <rdreier@...>, <bzolnier@...>, <flo@...>, <linux-kernel@...>, <j-nomura@...>, <linux-ide@...>, <k-ueda@...>
Subject:
Re: kernel BUG at ide-cd.c:1726 in 2.6.24-03863-g0ba6c33 && -g8561b089
Date: Friday, February 1, 2008 - 3:37 pm
Hi Boris, On Fri, 1 Feb 2008 19:29:09 +0100, Borislav Petkov wrote:
quoted text
> > > > end_that_request_last() is not called when __blk_end_reuqest() > > > > returns 1. Then, the issuer isn't waken up. > > > > So I think the BUG() or error messages should be there. > > > > > > you mean, end_that_request_last() isn't called when __end_that_request_first() > > > returns an error and this is the case only for fs and pc requests. > > > Otherwise it _is_ called, thus simulating somewhat the previous behavior. > > > However, we never BUG()'ged on residual byte counts before and > > > this driver has been in the kernel tree for ages, so what puzzles > > > me now is how is BUG()'ing here better than before and shouldn't we > > > simply issue a warning instead of killing the interrupt handler... > > > > The Jens' patch passes the residual byte counts to __blk_end_request(), > > so __end_that_reqeust_first() should never return 1 and we should never > > BUG() on the residual byte counts, unless inconsistency happens such as > > the size of remaining bios is bigger than the residual byte counts. > > yep. > > > So if __blk_end_request() returns 1 even with the Jens' patch, > > it means that the block layer or the driver really have a bug. > > And then, the request and the bios could leak or the issuer > > would wait forever because end_that_request_last() isn't called. > > > > The previous behavior might ignore such inconsistency and leak only > > the bios because it was calling end_that_request_last() anyway. > > I would like to BUG() in such cases personally, but I don't object > > strongly if you prefer not to BUG(). > > BUG() is definitely what we should do here to catch this case of sizeof(bios) > > rq->data_len. Putting a brown paper bag over the issue will never get it fixed > if it really leaks bios. Thanks for clarifying that. > > By the way, shouldn't we be doing a little branch prediction here: > > diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c > index 74c6087..bee05a3 100644 > --- a/drivers/ide/ide-cd.c > +++ b/drivers/ide/ide-cd.c > @@ -1722,7 +1722,7 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive) > */ > if ((stat & DRQ_STAT) == 0) { > spin_lock_irqsave(&ide_lock, flags); > - if (__blk_end_request(rq, 0, 0)) > + if (unlikely(__blk_end_request(rq, 0, rq->data_len))) > BUG(); > HWGROUP(drive)->rq = NULL; > spin_unlock_irqrestore(&ide_lock, flags);
I think it's reasonable. Thanks, Kiyoshi Ueda --
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:
kernel BUG at ide-cd.c:1726 in 2.6.24-03863-g0ba6c33 &&a...
, Nai Xia
, (Tue Jan 29, 10:01 am)
Re: kernel BUG at ide-cd.c:1726 in 2.6.24-03863-g0ba6c33 &am...
, Kiyoshi Ueda
, (Tue Jan 29, 4:13 pm)
Re: kernel BUG at ide-cd.c:1726 in 2.6.24-03863-g0ba6c33 &am...
, Roland Dreier
, (Tue Jan 29, 6:22 pm)
Re: kernel BUG at ide-cd.c:1726 in 2.6.24-03863-g0ba6c33 &am...
, Kiyoshi Ueda
, (Tue Jan 29, 7:23 pm)
Re: kernel BUG at ide-cd.c:1726 in 2.6.24-03863-g0ba6c33 &am...
, Kiyoshi Ueda
, (Wed Jan 30, 9:26 pm)
Re: kernel BUG at ide-cd.c:1726 in 2.6.24-03863-g0ba6c33 &am...
, Roland Dreier
, (Wed Jan 30, 10:34 pm)
Re: kernel BUG at ide-cd.c:1726 in 2.6.24-03863-g0ba6c33 &am...
, Nai Xia
, (Thu Jan 31, 3:49 am)
Re: kernel BUG at ide-cd.c:1726 in 2.6.24-03863-g0ba6c33 &am...
, Jens Axboe
, (Thu Jan 31, 9:05 am)
Re: kernel BUG at ide-cd.c:1726 in 2.6.24-03863-g0ba6c33 &am...
, Borislav Petkov
, (Thu Jan 31, 5:37 pm)
Re: kernel BUG at ide-cd.c:1726 in 2.6.24-03863-g0ba6c33 &am...
, Kiyoshi Ueda
, (Thu Jan 31, 6:35 pm)
Re: kernel BUG at ide-cd.c:1726 in 2.6.24-03863-g0ba6c33 &am...
, Borislav Petkov
, (Fri Feb 1, 3:51 am)
Re: kernel BUG at ide-cd.c:1726 in 2.6.24-03863-g0ba6c33 &am...
, Kiyoshi Ueda
, (Fri Feb 1, 1:39 pm)
Re: kernel BUG at ide-cd.c:1726 in 2.6.24-03863-g0ba6c33 &am...
, Borislav Petkov
, (Fri Feb 1, 2:29 pm)
Re: kernel BUG at ide-cd.c:1726 in 2.6.24-03863-g0ba6c33 &am...
, Kiyoshi Ueda
, (Fri Feb 1, 3:37 pm)
Re: kernel BUG at ide-cd.c:1726 in 2.6.24-03863-g0ba6c33 &am...
, Kiyoshi Ueda
, (Thu Jan 31, 1:04 pm)
Re: kernel BUG at ide-cd.c:1726 in 2.6.24-03863-g0ba6c33 &am...
, Jens Axboe
, (Thu Jan 31, 2:16 pm)
Re: kernel BUG at ide-cd.c:1726 in 2.6.24-03863-g0ba6c33 &am...
, Kiyoshi Ueda
, (Thu Jan 31, 4:35 pm)
Re: kernel BUG at ide-cd.c:1726 in 2.6.24-03863-g0ba6c33 &am...
, Florian Lohoff
, (Thu Jan 31, 10:53 am)
Re: kernel BUG at ide-cd.c:1726 in 2.6.24-03863-g0ba6c33 &am...
, Jens Axboe
, (Thu Jan 31, 11:04 am)
Re: kernel BUG at ide-cd.c:1726 in 2.6.24-03863-g0ba6c33 &am...
, Bartlomiej Zolnierkiewicz...
, (Fri Feb 1, 5:59 pm)
Re: kernel BUG at ide-cd.c:1726 in 2.6.24-03863-g0ba6c33 &am...
, Bartlomiej Zolnierkiewicz...
, (Tue Jan 29, 7:58 pm)
Re: kernel BUG at ide-cd.c:1726 in 2.6.24-03863-g0ba6c33 &am...
, Borislav Petkov
, (Wed Jan 30, 1:03 am)
Re: kernel BUG at ide-cd.c:1726 in 2.6.24-03863-g0ba6c33 &am...
, Borislav Petkov
, (Wed Jan 30, 1:16 am)
Re: kernel BUG at ide-cd.c:1726 in 2.6.24-03863-g0ba6c33 &am...
, Florian Lohoff
, (Tue Jan 29, 11:33 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Michal Piotrowski
Re: [BUG] fs/xfs/xfs_bmap_btree.c:2312: error: 'b' undeclared (first use in this f...
debian developer
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Greg KH
[GIT PATCH] driver core patches against 2.6.24
Paul Jackson
[PATCH 0/5 v2] x86 boot: various E820 & EFI related fixes - what changed in v2
git
:
openbsd-misc
:
linux-netdev
:
Paweł Staszewski
Re: rib_trie / Fix inflate_threshold_root. Now=15 size=11 bits
David Miller
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
Jarek Poplawski
Re: Data corruption issue with splice() on 2.6.27.10
Colocation donated by:
Who's online
There are currently
1 user
and
812 guests
online.
Online users
zeekec
Syndicate