Whamcloud - gitweb
LU-10166 mdc: invalid free in changelog reader 07/30207/2
authorHenri Doreau <henri.doreau@cea.fr>
Fri, 27 Oct 2017 07:31:58 +0000 (09:31 +0200)
committerJohn L. Hammond <john.hammond@intel.com>
Mon, 27 Nov 2017 14:41:29 +0000 (14:41 +0000)
commitcdc9a2592a8fac58eee66c34399f8bfea013132c
tree8a15b6cf497f7a7bafafd8737c72cd106b0da6ac
parente881c665bb60543fd2bbbd2d195ccce99a65f16b
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>
(cherry picked from commit 89e52326b5bd3d2716ce6ec5d9f9d787947d91a1)
Reviewed-on: https://review.whamcloud.com/30207
lustre/mdc/mdc_changelog.c