Re: [bug] block subsystem related crash with latest -git

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

 




On Wed, 17 Oct 2007, Jens Axboe wrote:
> >
> >  - remove the "memset()" you had added earlier. It's bogus. It cannot be 
> >    the right thing. If the sg list wasn't initialized correctly much 
> >    earlier, trying to initialize it late is pointless - it contains crap.
> 
> It's required to clear output members (like dma_len and so on), since
> some of the IOMU code really wants that initialized.

No it's NOT!

The whole point here is that the sg had *already* better be cleared.

If it wasn't cleared before, that's a bug regardless of anything else. So 
a memset() is guaranteed to be either a no-op or hiding another bug!

So yes, those members had better be zero. It's just that they had better 
be zero long before that memset! The memset should have been done when 
allocating the SG list.

> If you prefer the old next_sg approach to my alternative, that is fine
> with me. But we do need the memset().

Really? Explain why. Entering that code with a non-initialized SG list is 
a bug to begin with.

		Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux