Re: [PATCH] mm: Remove usages of ACCESS_ONCE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2015-03-24 at 11:30 +0100, Michal Hocko wrote:
> On Mon 23-03-15 15:44:40, Jason Low wrote:
> > Commit 38c5ce936a08 converted ACCESS_ONCE usage in gup_pmd_range() to
> > READ_ONCE, since ACCESS_ONCE doesn't work reliably on non-scalar types.
> > 
> > This patch removes the rest of the usages of ACCESS_ONCE, and use
> > READ_ONCE for the read accesses. This also makes things cleaner,
> > instead of using separate/multiple sets of APIs.
> > 
> > Signed-off-by: Jason Low <jason.low2@xxxxxx>
> 
> Makes sense to me. I would prefer a patch split into two parts. One which
> changes potentially dangerous usage of ACCESS_ONCE and the cleanup. This
> will make the life of those who backport patches into older kernels
> easier a bit.

Okay, so have a patch 1 which fixes the following:

    pte_t pte = ACCESS_ONCE(*ptep);
    pgd_t pgd = ACCESS_ONCE(*pgdp);

and the rest of the changes in the cleanup patch 2?

> I won't insist though.
> 
> Acked-by: Michal Hocko <mhocko@xxxxxxx>

Thanks,
Jason

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]