All of lore.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <borislav.petkov@amd.com>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	linux-next@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: linux-next: Tree for May 29 (__rdmsr_on_cpu() OOPS)
Date: Tue, 2 Jun 2009 16:13:25 +0200	[thread overview]
Message-ID: <20090602141325.GB13792@aftab> (raw)
In-Reply-To: <200905302137.57644.bzolnier@gmail.com>

Hi,

On Sat, May 30, 2009 at 09:37:57PM +0200, Bartlomiej Zolnierkiewicz wrote:
> 
> next-20090529 oopses in __rdmsr_on_cpu() on my Pentium M laptop.
> 
> .jpg + .config:
> http://www.kernel.org/pub/linux/kernel/people/bart/next-20090529-oops.*
> 
> (gdb) l *0xc023410f
> 0xc023410f is in __rdmsr_on_cpu (arch/x86/lib/msr.c:25).
> 20              if (rv->msrs)
> 21                      reg = &rv->msrs[this_cpu - rv->off];
> 22              else
> 23                      reg = &rv->reg;
> 24
> 25              rdmsr(rv->msr_no, reg->l, reg->h);
> 26      }
> 27
> 28      static void __wrmsr_on_cpu(void *info)
> 29      {
> 
> Thus the problem seems to be introduced by:
> 
> commit 23d19840368b2787d2da97ad0f0f29248503648a
> Author: Borislav Petkov <borislav.petkov@amd.com>
> Date:   Fri May 22 13:52:19 2009 +0200
> 
>     x86: MSR: add methods for writing of an MSR on several CPUs
> ...
> 
> and indeed the following patch fixes it:
> 
> [ Borislav, feel free to fold it into the above change or replace by
>   a more complete one if needed (there may be more rv fields needing
>   initialization). ]
> 
> From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> Subject: [PATCH] x86: MSR: fix __rdmsr_on_cpu() OOPS
> 
> {rd,wr}msr_on_cpu() need to explicitly initalize rv.msrs
> (since rv is allocated on the stack).
> 
> Cc: Borislav Petkov <borislav.petkov@amd.com>
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Thanks.

I went and zeroed out the whole struct so that no stale data sneaks
in. I'm still adding your S-O-B to the patch, if you don't mind, that
is.

-- 
Regards/Gruss,
Boris.

Operating | Advanced Micro Devices GmbH
  System  | Karl-Hammerschmidt-Str. 34, 85609 Dornach b. München, Germany
 Research | Geschäftsführer: Thomas M. McCoy, Giuliano Meroni
  Center  | Sitz: Dornach, Gemeinde Aschheim, Landkreis München
  (OSRC)  | Registergericht München, HRB Nr. 43632

      parent reply	other threads:[~2009-06-02 14:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-29  4:50 linux-next: Tree for May 29 Stephen Rothwell
2009-05-30 19:37 ` linux-next: Tree for May 29 (__rdmsr_on_cpu() OOPS) Bartlomiej Zolnierkiewicz
2009-06-01 19:55   ` Eric Paris
2009-06-02 14:13   ` Borislav Petkov [this message]

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=20090602141325.GB13792@aftab \
    --to=borislav.petkov@amd.com \
    --cc=bzolnier@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.