dm-crypt: remove per-cpu structure
Dm-crypt used per-cpu structures to hold pointers to ablkcipher_request. The code assumed that the work item keeps executing on a single CPU, so it used no synchronization when accessing this structure. When we disable a CPU by writing zero to /sys/devices/system/cpu/cpu*/online, the work item could be moved to another CPU. This causes crashes in dm-crypt because the code starts using a wrong ablkcipher_request. This patch fixes this bug by removing the percpu definition. The structure ablkcipher_request is accessed via a pointer from convert_context. Consequently, if the work item is rescheduled to a different CPU, the thread still uses the same ablkcipher_request. CRs-fixed: 670391 Change-Id: Ib94281c719aedb1d53b853d38085d2e3f884665b Signed-off-by:Mikulas Patocka <mpatocka@redhat.com> Cc: stable@vger.kernel.org Patch-mainline: dm-devel @ 04/05/14, 14:04 Signed-off-by:
Joonwoo Park <joonwoop@codeaurora.org>
Loading
Please register or sign in to comment