diff options
author | Jun'ichi Nomura <j-nomura@ce.jp.nec.com> | 2005-09-10 01:23:42 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-10 01:39:09 +0200 |
commit | 844e8d904a7c1446e3f040683b4a0645c3eb168f (patch) | |
tree | 5e277539dab95d6325cec564a91e0e70acdce021 /Documentation/sched-coding.txt | |
parent | [PATCH] md: fail IO request to md that require a barrier. (diff) | |
download | linux-844e8d904a7c1446e3f040683b4a0645c3eb168f.tar.xz linux-844e8d904a7c1446e3f040683b4a0645c3eb168f.zip |
[PATCH] dm: fix rh_dec()/rh_inc() race in dm-raid1.c
Fix another bug in dm-raid1.c that the dirty region may stay in or be moved
to clean list and freed while in use.
It happens as follows:
CPU0 CPU1
------------------------------------------------------------------------------
rh_dec()
if (atomic_dec_and_test(pending))
<the region is still marked dirty>
rh_inc()
if the region is clean
mark the region dirty
and remove from clean list
mark the region clean
and move to clean list
atomic_inc(pending)
At this stage, the region is in clean list and will be mistakenly reclaimed
by rh_update_states() later.
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'Documentation/sched-coding.txt')
0 files changed, 0 insertions, 0 deletions