[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110214.152500.104069812.davem@davemloft.net>
Date: Mon, 14 Feb 2011 15:25:00 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: mathieu.desnoyers@...ymtl.ca
Cc: matt@...sole-pimps.org, rostedt@...dmis.org, peterz@...radead.org,
will.newton@...il.com, jbaron@...hat.com, hpa@...or.com,
mingo@...e.hu, tglx@...utronix.de, andi@...stfloor.org,
roland@...hat.com, rth@...hat.com, masami.hiramatsu.pt@...achi.com,
fweisbec@...il.com, avi@...hat.com, sam@...nborg.org,
ddaney@...iumnetworks.com, michael@...erman.id.au,
linux-kernel@...r.kernel.org, vapier@...too.org,
cmetcalf@...era.com, dhowells@...hat.com, schwidefsky@...ibm.com,
heiko.carstens@...ibm.com, benh@...nel.crashing.org,
paulmck@...ux.vnet.ibm.com
Subject: Re: [PATCH 0/2] jump label: 2.6.38 updates
From: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.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(¤t->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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists