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