lkml.org 
[lkml]   [2011]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 0/2] jump label: 2.6.38 updates
From
From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Date: Mon, 14 Feb 2011 18:03:01 -0500

> If this is true, then we have bugs in lots of xchg/cmpxchg users (which
> do not reside in atomic.h), e.g.:
>
> fs/fs_struct.c:
> int current_umask(void)
> {
> return current->fs->umask;
> }
> EXPORT_SYMBOL(current_umask);
>
> kernel/sys.c:
> SYSCALL_DEFINE1(umask, int, mask)
> {
> mask = xchg(&current->fs->umask, mask & S_IRWXUGO);
> return mask;
> }
>
> The solution to this would be to force all xchg/cmpxchg users to swap to
> atomic.h variables, which would force the ll semantic on read. But I'd
> really like to see where this is documented first -- or which PowerPC
> engineer we should talk to.

We can't wholesale to atomic_t because we do this on variables of
all sizes, not just 32-bit ones.

We do them on pointers in the networking for example.


\
 
 \ /
  Last update: 2011-02-15 00:27    [W:1.146 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site