[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#604627: linux-image-2.6.32-5-amd64: megasas: Failed to alloc kernel SGL buffer for IOCTL



On Tue, 2011-01-25 at 09:24 +0100, Bjørn Mork wrote:
> Marc-Christian Petersen <m.c.p@gmx.de> writes:
> 
> > so, what's up with this fix? Any chance to get it into Debians kernel tree?
> >
> > It's kind of uncomfortable to rebuild the whole kernel, with this applied,
> > when Debian releases a new kernel which happens frequently ;->
> 
> I fully understand. I must admit that I thought it would be a no-brainer
> to verify this and get it into the upstream and the 2.6.32.x stable tree.  
[...]

Your patch removes the initialisation of kern_sge32[i] when
ioc->sgl[i].iov_len is zero.  I think it should at least set the length
to zero.

Perhaps it's safest to pass max(ioc->sgl[i].iov_len, 1) as the length
parameter to dma_alloc_coherent().

Ben.

-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: