[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171011231137.GI5109@tassilo.jf.intel.com>
Date: Wed, 11 Oct 2017 16:11:37 -0700
From: Andi Kleen <ak@...ux.intel.com>
To: Borislav Petkov <bp@...en8.de>
Cc: "Luck, Tony" <tony.luck@...el.com>,
Jeremy Cline <jcline@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
linux-edac@...r.kernel.org, linux-kernel@...r.kernel.org,
Laura Abbott <labbott@...hat.com>
Subject: Re: x86/mce: suspicious RCU usage in 4.13.4
> - next = mce_log_get_idx_check(mcelog.next);
> + next = mcelog.next;
>
> /* Only supports full reads right now */
> err = -EINVAL;
> @@ -281,8 +266,6 @@ static ssize_t mce_chrdev_read(struct file *filp, char __user *ubuf,
> next = cmpxchg(&mcelog.next, prev, 0);
> } while (next != prev);
>
> - synchronize_sched();
Sorry I take back what I wrote earlier. This RCU is actually still needed,
otherwise the reader could see partially written entries.
So rather have to keep that, and change the read code to run with rcu_read_lock()
-Andi
Powered by blists - more mailing lists