lkml.org 
[lkml]   [2008]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [GIT PATCH] another tranche of SCSI updates for 2.6.26


On Sun, 27 Apr 2008, James Bottomley wrote:
>
> Try this; the signature for an uninitialised free list is easy (both
> list pointers NULL), so the patch detects that and doesn't try to run
> over the uninitialised list head.

Why aren't these things initialized?

You say that the signature of an uninitialised free list is trivial, but
that's not at all true in general. It depends intimately on how the memory
was allocated, and is thus very subtle indeed - some change to allocations
can break something simple like this, by initializing it with random old
memory contents.

So why not just initialize lists like this so early (ie at allocation
time) that problems like this cannot happen? Instead of adding ugly and
fragile cases to the freeing?

Linus


\
 
 \ /
  Last update: 2008-04-28 18:09    [W:0.407 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site