diff options
author | liguang <lig.fnst@cn.fujitsu.com> | 2013-04-30 18:27:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-30 20:04:02 -0400 |
commit | 1def1dc91715acdb6dddfaed1a44149d42d8063c (patch) | |
tree | 34bbf0888cf4fbf32fe37e2851f44c0304c5a241 /kernel/smp.c | |
parent | ef3b101925f2170c2b8cd2e126b37492ae02f77c (diff) |
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>
Diffstat (limited to 'kernel/smp.c')
-rw-r--r-- | kernel/smp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/smp.c b/kernel/smp.c index 8e451f3ff51b..b320622543e9 100644 --- a/kernel/smp.c +++ b/kernel/smp.c | |||
@@ -109,7 +109,7 @@ static void csd_lock_wait(struct call_single_data *data) | |||
109 | static void csd_lock(struct call_single_data *data) | 109 | static void csd_lock(struct call_single_data *data) |
110 | { | 110 | { |
111 | csd_lock_wait(data); | 111 | csd_lock_wait(data); |
112 | data->flags = CSD_FLAG_LOCK; | 112 | data->flags |= CSD_FLAG_LOCK; |
113 | 113 | ||
114 | /* | 114 | /* |
115 | * prevent CPU from reordering the above assignment | 115 | * prevent CPU from reordering the above assignment |