Whamcloud - gitweb
LU-10166 mdc: invalid free in changelog reader 18/29818/9
authorHenri Doreau <henri.doreau@cea.fr>
Fri, 27 Oct 2017 07:31:58 +0000 (09:31 +0200)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 22 Nov 2017 03:56:02 +0000 (03:56 +0000)
commit89e52326b5bd3d2716ce6ec5d9f9d787947d91a1
tree2765142ad8e7403caa3f89969fbaa8ee901e09e4
parentbac71754b9dbb83b3ccf10ae99c027cc6b2f9829
LU-10166 mdc: invalid free in changelog reader

Use kthread_stop() to instruct the producer thread to exit
when the device is closed, and only then: release the CRS
structure.

The previous implementation left small time windows open,
during which the producer threads could free a structure
before the consumer thread was completely done with it.

Change-Id: Id2038aa9b7fcfd2c3347f628e749f9d2c265ac6e
Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-on: https://review.whamcloud.com/29818
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/mdc/mdc_changelog.c