diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-03-07 15:47:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-03-07 15:47:24 -0500 |
commit | e2e091fd99400029120eeefde062fdf417ab37f6 (patch) | |
tree | 85761f03229f8b903238bcf8dc930cad281f4871 /fs/ecryptfs/messaging.c | |
parent | cd66acb412d3466bb95d3d7621afbea98647a028 (diff) | |
parent | 290502bee239062499297916bb7d21d205e99d62 (diff) |
Merge tag 'ecryptfs-3.9-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs
Pull ecryptfs fixes from Tyler Hicks:
"Minor code cleanups and new Kconfig option to disable /dev/ecryptfs
The code cleanups fix up W=1 compiler warnings and some unnecessary
checks. The new Kconfig option, defaulting to N, allows the rarely
used eCryptfs kernel to userspace communication channel to be compiled
out. This may be the first step in it being eventually removed."
Hmm. I'm not sure whether these should be called "fixes", and it
probably should have gone in the merge window. But I'll let it slide.
* tag 'ecryptfs-3.9-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs:
eCryptfs: allow userspace messaging to be disabled
eCryptfs: Fix redundant error check on ecryptfs_find_daemon_by_euid()
ecryptfs: ecryptfs_msg_ctx_alloc_to_free(): remove kfree() redundant null check
eCryptfs: decrypt_pki_encrypted_session_key(): remove kfree() redundant null check
eCryptfs: remove unneeded checks in virt_to_scatterlist()
eCryptfs: Fix -Wmissing-prototypes warnings
eCryptfs: Fix -Wunused-but-set-variable warnings
eCryptfs: initialize payload_len in keystore.c
Diffstat (limited to 'fs/ecryptfs/messaging.c')
-rw-r--r-- | fs/ecryptfs/messaging.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/ecryptfs/messaging.c b/fs/ecryptfs/messaging.c index 8d7a577ae497..49ff8ea08f1c 100644 --- a/fs/ecryptfs/messaging.c +++ b/fs/ecryptfs/messaging.c | |||
@@ -97,8 +97,7 @@ static void ecryptfs_msg_ctx_free_to_alloc(struct ecryptfs_msg_ctx *msg_ctx) | |||
97 | void ecryptfs_msg_ctx_alloc_to_free(struct ecryptfs_msg_ctx *msg_ctx) | 97 | void ecryptfs_msg_ctx_alloc_to_free(struct ecryptfs_msg_ctx *msg_ctx) |
98 | { | 98 | { |
99 | list_move(&(msg_ctx->node), &ecryptfs_msg_ctx_free_list); | 99 | list_move(&(msg_ctx->node), &ecryptfs_msg_ctx_free_list); |
100 | if (msg_ctx->msg) | 100 | kfree(msg_ctx->msg); |
101 | kfree(msg_ctx->msg); | ||
102 | msg_ctx->msg = NULL; | 101 | msg_ctx->msg = NULL; |
103 | msg_ctx->state = ECRYPTFS_MSG_CTX_STATE_FREE; | 102 | msg_ctx->state = ECRYPTFS_MSG_CTX_STATE_FREE; |
104 | } | 103 | } |
@@ -283,7 +282,7 @@ ecryptfs_send_message_locked(char *data, int data_len, u8 msg_type, | |||
283 | int rc; | 282 | int rc; |
284 | 283 | ||
285 | rc = ecryptfs_find_daemon_by_euid(&daemon); | 284 | rc = ecryptfs_find_daemon_by_euid(&daemon); |
286 | if (rc || !daemon) { | 285 | if (rc) { |
287 | rc = -ENOTCONN; | 286 | rc = -ENOTCONN; |
288 | goto out; | 287 | goto out; |
289 | } | 288 | } |