]> git.baikalelectronics.ru Git - kernel.git/commit
md linear: Protecting mddev with rcu locks to avoid races
authorSandeepKsinha <sandeepksinha@gmail.com>
Wed, 17 Jun 2009 22:49:35 +0000 (08:49 +1000)
committerNeilBrown <neilb@suse.de>
Wed, 17 Jun 2009 22:49:35 +0000 (08:49 +1000)
commitafb9f985d0240689e2542dba8736807051cf9223
tree59371fb1f955083f890dd6434e4c2f0ab9b7a97a
parentef602910ee1a528d254d8a38e42fb9a69ef05e5f
md linear: Protecting mddev with rcu locks to avoid races

Due to the lack of memory ordering guarantees, we may have races around
mddev->conf.

In particular, the correct contents of the structure we get from
dereferencing ->private might not be visible to this CPU yet, and
they might not be correct w.r.t mddev->raid_disks.

This patch addresses the problem using rcu protection to avoid
such race conditions.

Signed-off-by: SandeepKsinha <sandeepksinha@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/linear.c