Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 58423ac0 authored by Mikulas Patocka's avatar Mikulas Patocka Committed by Joonwoo Park
Browse files

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: default avatarMikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org
Patch-mainline: dm-devel @ 04/05/14, 14:04
Signed-off-by: default avatarJoonwoo Park <joonwoop@codeaurora.org>
parent 1559d923
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment