linux-edac.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: Zhenzhong Duan <zhenzhong.duan@gmail.com>,
	linux-kernel@vger.kernel.org, linux-edac@vger.kernel.org,
	x86@kernel.org, tglx@linutronix.de, mingo@redhat.com,
	hpa@zytor.com, Yazen Ghannam <yazen.ghannam@amd.com>
Subject: Re: [PATCH] x86/mce: fix a wrong assignment of i_mce.status
Date: Mon, 15 Jun 2020 13:36:04 +0200	[thread overview]
Message-ID: <20200615113604.GF14668@zn.tnic> (raw)
In-Reply-To: <20200611165500.GA3503@agluck-desk2.amr.corp.intel.com>

On Thu, Jun 11, 2020 at 09:55:00AM -0700, Luck, Tony wrote:
> +Yazen
> 
> On Thu, Jun 11, 2020 at 10:32:38AM +0800, Zhenzhong Duan wrote:
> > The original code is a nop as i_mce.status is or'ed with part of itself,
> > fix it.
> > 
> > Signed-off-by: Zhenzhong Duan <zhenzhong.duan@gmail.com>
> > ---
> >  arch/x86/kernel/cpu/mce/inject.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/arch/x86/kernel/cpu/mce/inject.c b/arch/x86/kernel/cpu/mce/inject.c
> > index 3413b41..dc28a61 100644
> > --- a/arch/x86/kernel/cpu/mce/inject.c
> > +++ b/arch/x86/kernel/cpu/mce/inject.c
> > @@ -511,7 +511,7 @@ static void do_inject(void)
> >  	 */
> >  	if (inj_type == DFR_INT_INJ) {
> >  		i_mce.status |= MCI_STATUS_DEFERRED;
> > -		i_mce.status |= (i_mce.status & ~MCI_STATUS_UC);
> > +		i_mce.status &= ~MCI_STATUS_UC;
> 
> Boris: "git blame" says you wrote this code.

Not me but I should've caught it:

a1300e505297 ("x86/ras/mce_amd_inj: Trigger deferred and thresholding errors interrupts")

:-\

I believe Aravind wanted to do the &= thing, i.e.,

	i_mce.status = (i_mce.status & ~MCI_STATUS_UC);

or the short version above.

:-)

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

      parent reply	other threads:[~2020-06-15 11:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11  2:32 [PATCH] x86/mce: fix a wrong assignment of i_mce.status Zhenzhong Duan
2020-06-11 16:55 ` Luck, Tony
2020-06-11 18:36   ` Yazen Ghannam
2020-06-15 11:36   ` 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=20200615113604.GF14668@zn.tnic \
    --to=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    --cc=yazen.ghannam@amd.com \
    --cc=zhenzhong.duan@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).