lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <201211081220.55281.b.zolnierkie@samsung.com>
Date:	Thu, 08 Nov 2012 12:20:55 +0100
From:	Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
To:	Alan Cox <alan@...rguk.ukuu.org.uk>
Cc:	linux-kernel@...r.kernel.org, linux-raid@...r.kernel.org,
	Neil Brown <neilb@...e.de>, Vinod Koul <vinod.koul@...el.com>,
	Dan Williams <djbw@...com>, Tomasz Figa <t.figa@...sung.com>,
	Kyungmin Park <kyungmin.park@...sung.com>
Subject: Re: [PATCH] raid5: panic() on dma_wait_for_async_tx() error

On Thursday 08 November 2012 12:15:26 Alan Cox wrote:
> On Thu, 08 Nov 2012 11:06:29 +0100
> Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com> wrote:
> 
> > From: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
> > Subject: [PATCH] raid5: panic() on dma_wait_for_async_tx() error
> > 
> > There is not much we can do on dma_wait_for_async_tx() error
> > so just panic() for now.
> > 
> > Cc: Neil Brown <neilb@...e.de>
> > Cc: Vinod Koul <vinod.koul@...el.com>
> > Cc: Dan Williams <djbw@...com>
> > Cc: Tomasz Figa <t.figa@...sung.com>
> > Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
> > Signed-off-by: Kyungmin Park <kyungmin.park@...sung.com>
> > ---
> >  drivers/md/raid5.c |    4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > Index: b/drivers/md/raid5.c
> > ===================================================================
> > --- a/drivers/md/raid5.c	2012-11-07 16:25:19.480876012 +0100
> > +++ b/drivers/md/raid5.c	2012-11-07 16:27:46.244875992 +0100
> > @@ -3223,7 +3223,9 @@ static void handle_stripe_expansion(stru
> >  	/* done submitting copies, wait for them to complete */
> >  	if (tx) {
> >  		async_tx_ack(tx);
> > -		dma_wait_for_async_tx(tx);
> > +		if (dma_wait_for_async_tx(tx) != DMA_SUCCESS)
> > +			panic("%s: DMA error waiting for transaction\n",
> > +			      __func__);
> 
> Thats a really horrible place to panic.

Still it seems better thing to do than silently ignoring errors
and trying to continue operations with inconsistent data.

Unfortunately higher-layers don't support error conditions and
fixing them seems to be non-trivial task.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung Poland R&D Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ