diff options
author | Kees Cook <keescook@chromium.org> | 2013-08-13 15:02:27 -0700 |
---|---|---|
committer | Tyler Hicks <tyhicks@canonical.com> | 2013-09-06 16:58:18 -0700 |
commit | cb69f36ba1f8d5e73c46538e84a88178fb17f23d (patch) | |
tree | df95c5e4d7c9697d22d21653571cc2f5960b5256 /fs/ecryptfs/super.c | |
parent | e6cbd6a44d8e263073808da9f295e502d15dc3fe (diff) |
ecryptfs: avoid ctx initialization race
It might be possible for two callers to race the mutex lock after the
NULL ctx check. Instead, move the lock above the check so there isn't
the possibility of leaking a crypto ctx. Additionally, report the full
algo name when failing.
Signed-off-by: Kees Cook <keescook@chromium.org>
[tyhicks: remove out label, which is no longer used]
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Diffstat (limited to 'fs/ecryptfs/super.c')
0 files changed, 0 insertions, 0 deletions