mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
kernel/smp.c: use '|=' for csd_lock
csd_lock() uses assignment to data->flags rather than |=. That is not buggy at present because only one bit (CSD_FLAG_LOCK) is defined in call_single_data.flags. But it will become buggy if we later add another flag, so fix it now. Signed-off-by: liguang <lig.fnst@cn.fujitsu.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
ef3b101925
commit
1def1dc917
1 changed files with 1 additions and 1 deletions
|
@ -109,7 +109,7 @@ static void csd_lock_wait(struct call_single_data *data)
|
|||
static void csd_lock(struct call_single_data *data)
|
||||
{
|
||||
csd_lock_wait(data);
|
||||
data->flags = CSD_FLAG_LOCK;
|
||||
data->flags |= CSD_FLAG_LOCK;
|
||||
|
||||
/*
|
||||
* prevent CPU from reordering the above assignment
|
||||
|
|
Loading…
Reference in a new issue