]> git.baikalelectronics.ru Git - kernel.git/commit
[S390] dcssblk: fix race in dcssblk_add_store()
authorGerald Schaefer <gerald.schaefer@de.ibm.com>
Thu, 21 Aug 2008 17:46:40 +0000 (19:46 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 21 Aug 2008 17:46:42 +0000 (19:46 +0200)
commit5fd7cbd948d91146748548e8a3f4feae7af9e97f
tree3a772f76a2fdbd6e570611202736b1f53b2e4c2d
parenta34b51e6ad608c6f11e8e4a1a35b37228dcca85d
[S390] dcssblk: fix race in dcssblk_add_store()

Concurrently adding the same segment may lead to duplicate device_register()
calls, which will trigger an error in kobject code:
"... don't try to register things with the same name in the same directory".
This patch adds a check to avoid this.

Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/block/dcssblk.c