All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] ext4 crypto: type bug with encrypted symlinks
@ 2015-04-15  9:21 ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2015-04-15  9:21 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: Andreas Dilger, linux-ext4, kernel-janitors

sd->len is an __le16 and not an __le32.

Fixes: f1195c72c951 ('ext4 crypto: Add symlink encryption')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 69e12ee..5c82a3c 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -3256,7 +3256,7 @@ static int ext4_symlink(struct inode *dir,
 		ext4_put_fname_crypto_ctx(&ctx);
 		if (err < 0)
 			goto err_drop_inode;
-		sd->len = cpu_to_le32(ostr.len);
+		sd->len = cpu_to_le16(ostr.len);
 		disk_link.name = (char *) sd;
 	}
 

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-04-15 16:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-15  9:21 [patch] ext4 crypto: type bug with encrypted symlinks Dan Carpenter
2015-04-15  9:21 ` Dan Carpenter
2015-04-15 15:14 ` Andreas Dilger
2015-04-15 15:14   ` Andreas Dilger
2015-04-15 16:45   ` Theodore Ts'o
2015-04-15 16:45     ` Theodore Ts'o

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.