Re: [2.4 PATCH] Don't panic on IDE DMA errors
- From: Andre Hedrick <andre@xxxxxxxxxxxxx>
- Date: Sat, 31 Dec 2005 02:01:24 -0800 (PST)
What was the panic base on error?
It should have aborted the request and block resends it.
However, the logic seems sane and if the request is lost on error this
would corrupt if it did not panic.
Is there a clear way to reproduce this in a controlled manner?
IE the goal would be to test data integerity on the events.
Cheers,
Andre Hedrick
LAD Storage Consulting Group
On Mon, 28 Nov 2005, Marcelo Tosatti wrote:
>
>
> diff-tree e8f3e8dd41308fb66c026f51bb86b23205ad48c1 (from 0b85d6aa75faefe28d90362424035ef7b349974c)
> Author: Chris Ross <lak1646@xxxxxxxxxxxx>
> Date: Wed Nov 23 15:56:00 2005 +0000
>
> [PATCH] Don't panic on IDE DMA errors
>
> Kernel 2.4.32 and earlier can panic when trying to read a corrupted
> sector from an IDE disk.
>
> The function ide_dma_timeout_retry can end a request early by calling
> idedisk_error, but then goes on to use the request anyway causing a
> kernel panic due to a null pointer exception. This patch fixes that.
>
> diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
> index 3f6a0aa..6fc6f77 100644
> --- a/drivers/ide/ide-io.c
> +++ b/drivers/ide/ide-io.c
> @@ -899,11 +899,13 @@ static ide_startstop_t ide_dma_timeout_r
> rq = HWGROUP(drive)->rq;
> HWGROUP(drive)->rq = NULL;
>
> - rq->errors = 0;
> - rq->sector = rq->bh->b_rsector;
> - rq->current_nr_sectors = rq->bh->b_size >> 9;
> - rq->hard_cur_sectors = rq->current_nr_sectors;
> - rq->buffer = rq->bh->b_data;
> + if (rq) {
> + rq->errors = 0;
> + rq->sector = rq->bh->b_rsector;
> + rq->current_nr_sectors = rq->bh->b_size >> 9;
> + rq->hard_cur_sectors = rq->current_nr_sectors;
> + rq->buffer = rq->bh->b_data;
> + }
>
> return ret;
> }
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Prev by Date: Re: PROBLEM: Linux ATAPI CDROM ->FIX: SAMSUNG CD-ROM SC-140
- Next by Date: Re: system keeps freezing once every 24 hours / random apps crashing
- Previous by thread: Integer types
- Next by thread: Re: unkillable process dselect 2.6.15-rc1 and 2.6.15-rc1-mm1
- Index(es):
Relevant Pages
- Re: realtime-preempt patch-2.6.18-rt7 oops
... for you to send me your .config (nevermind that request) so I could ... try
to reproduce it here. ... More majordomo info at http://vger.kernel.org/majordomo-info.html
... Please read the FAQ at http://www.tux.org/lkml/ ... (Linux-Kernel) - Re: FAQ/FAQ notes site makeover
... VK said the following on 11/22/2006 5:39 PM: in XML format in the body of Usenet
post, ... problem is updating the FAQ with the requested changes. ... (if request
for update). ... (comp.lang.javascript) - Re: Portfolio Server Attribute Mapping Configuration Error
... Try posting on the server newsgroup. ... Please see FAQ Item: 24. ...
"The request failed with HTTP status 401: ... Authentication Type: NTLM ...
(microsoft.public.project) - Re: Translation of recipe
... (who, I supect, would prefer to be invited over for a taste-test... ...
Point to the FAQ or group charter, give advice how/where to find a forum ... that would
welcome the request, offer to help out by email, etc. ... (soc.genealogy.german) - Re: AJAX html wont refresh after data update
... Microsoft Internet Explorer caches the results of HTTP GET requests. ...
randomized query-string or use a HTTP POST request. ... Nothing that has not been proven
by peer review should be added to the FAQ. ... (comp.lang.javascript)