s390/cio: improve locking during cmbe allocation
authorSebastian Ott <sebott@linux.vnet.ibm.com>
Mon, 7 Sep 2015 17:52:06 +0000 (19:52 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 14 Oct 2015 12:32:03 +0000 (14:32 +0200)
commit616503d1d8940049841e5b6f2ab5157f37072ed9
tree0b4c551fe84e3bb391ae578f8a2a2d07bb336ef9
parenta6ef15652d260f754ead223d0c55434a3a39fe1d
s390/cio: improve locking during cmbe allocation

During allocation of extended measurement blocks we check if the device is
already active for channel measurement and add the device to a list of
devices with active channel measurement. The check is done under ccwlock
protection and the list modification is guarded by a different lock.

To guarantee that both states are in sync make sure that both locks
are held during the allocation process (like it's already done for the
"normal" measurement block allocation).

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/cio/cmf.c