diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2014-08-29 22:18:58 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-29 23:28:16 (GMT) |
commit | 2b462638e41ea62230297c21c4da9955937b7a3c (patch) | |
tree | 8f19675d518b40df09e7d21aa04c785eb5e303b8 /arch/m32r/kernel | |
parent | 4df4185a596c7301be0d8e1fdf691ec03e57cd23 (diff) | |
download | linux-2b462638e41ea62230297c21c4da9955937b7a3c.tar.xz |
ocfs2: do not write error flag to user structure we cannot copy from/to
If we failed to copy from the structure, writing back the flags leaks 31
bits of kernel memory (the rest of the ir_flags field).
In any case, if we cannot copy from/to the structure, why should we
expect putting just the flags to work?
Also make sure ocfs2_info_handle_freeinode() returns the right error
code if the copy_to_user() fails.
Fixes: ddee5cdb70e6 ('Ocfs2: Add new OCFS2_IOC_INFO ioctl for ocfs2 v8.')
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Joel Becker <jlbec@evilplan.org>
Acked-by: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/m32r/kernel')
0 files changed, 0 insertions, 0 deletions