[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 6 Jun 2019 18:02:28 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Andrea Parri <andrea.parri@...rulasolutions.com>,
linux-kernel@...r.kernel.org, will.deacon@....com, arnd@...db.de,
jhansen@...are.com, vdasa@...are.com, aditr@...are.com,
Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [PATCH] VMCI: Fixup atomic64_t abuse
On Thu, Jun 06, 2019 at 11:34:28AM +0200, Peter Zijlstra wrote:
>
> The VMCI driver is abusing atomic64_t and atomic_t, there is no actual
> atomic RmW operations around.
>
> Rewrite the code to use a regular u64 with READ_ONCE() and
> WRITE_ONCE() and a cast to 'unsigned long'. This fully preserves
> whatever broken there was (it's not endian-safe for starters, and also
> looks to be missing ordering).
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> ---
> include/linux/vmw_vmci_defs.h | 30 ++++++++++--------------------
> 1 file changed, 10 insertions(+), 20 deletions(-)
Now applied.
It's pretty horrid code, at least it's a tiny bit better now...
thanks,
greg k-h
Powered by blists - more mailing lists