mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [GIT PATCH] another tranche of SCSI updates for 2.6.26
Date: Mon, 28 Apr 2008 09:05:34 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.1.10.0804280903230.3119@woody.linux-foundation.org> (raw)
In-Reply-To: <1209351113.3801.107.camel@localhost.localdomain>



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

  parent reply	other threads:[~2008-04-28 16:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-27 18:14 James Bottomley
2008-04-28  1:34 ` Ingo Molnar
2008-04-28  1:45   ` Ingo Molnar
2008-04-28  2:51   ` James Bottomley
2008-04-28  7:15     ` Kamalesh Babulal
2008-04-28  7:23     ` Boaz Harrosh
2008-04-28  8:34       ` FUJITA Tomonori
2008-04-28  8:40         ` Boaz Harrosh
2008-04-28 12:13       ` James Bottomley
2008-04-28 12:24         ` Boaz Harrosh
2008-04-28 16:05     ` Linus Torvalds [this message]
2008-04-28 18:25       ` James Bottomley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.1.10.0804280903230.3119@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®