From: liguang Date: Tue, 30 Apr 2013 22:27:25 +0000 (-0700) Subject: kernel/smp.c: use '|=' for csd_lock X-Git-Tag: v3.10-rc1~143^2~80 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1def1dc91715acdb6dddfaed1a44149d42d8063c;p=platform%2Fupstream%2Fkernel-adaptation-pc.git 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 Cc: Peter Zijlstra Cc: Oleg Nesterov Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/smp.c b/kernel/smp.c index 8e451f3..b320622 100644 --- a/kernel/smp.c +++ b/kernel/smp.c @@ -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