mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Martin Schwidefsky" <schwidefsky@googlemail.com>
To: "David Wagner" <daw-usenet@taverner.cs.berkeley.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [S390] cio: kernel stack overflow.
Date: Wed, 30 Aug 2006 19:40:19 +0200	[thread overview]
Message-ID: <6e0cfd1d0608301040kf347dc8w6088a1fc8cd8b2b1@mail.gmail.com> (raw)
In-Reply-To: <ed4gno$d29$1@taverner.cs.berkeley.edu>

On 8/30/06, David Wagner <daw@cs.berkeley.edu> wrote:
> Have you checked that in all cases all fields of the struct have
> been overwritten?  For instance, look at this:
>
> Martin Schwidefsky  wrote:
> >-      chp->dev = (struct device) {
> >-              .parent  = &css[0]->device,
> >-              .release = chp_release,
> >-      };
> >+      chp->dev.parent = &css[0]->device;
> >+      chp->dev.release = chp_release;
>
> Doesn't this leave chp->dev.bus still holding whatever old value it
> had laying around before?  Unless I'm missing something, it looks to
> me like this diff causes a change in the semantics of the code.
>
> Perhaps it would be better to memset() the entire struct (chp->dev, in
> this case) to zero, before assigning to individual fields, so there is
> no possibility of old remnant data still being left laying around?

The structure is allocated with kzalloc().

-- 
blue skies,
  Martin

  reply	other threads:[~2006-08-30 17:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-30 12:40 Martin Schwidefsky
2006-08-30 17:09 ` David Wagner
2006-08-30 17:40   ` Martin Schwidefsky [this message]
2006-08-30 17:52   ` Julio Auto
2006-08-30 18:20     ` Julio Auto
2006-08-30 18:41     ` David Wagner
2006-08-30 19:05 ` David Wagner
2006-08-30 19:19   ` Heiko Carstens
2006-08-31  9:06     ` Martin Schwidefsky
2006-08-30 19:25   ` Julio Auto

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=6e0cfd1d0608301040kf347dc8w6088a1fc8cd8b2b1@mail.gmail.com \
    --to=schwidefsky@googlemail.com \
    --cc=daw-usenet@taverner.cs.berkeley.edu \
    --cc=linux-kernel@vger.kernel.org \
    /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®