diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2014-08-29 15:18:58 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-29 16:28:16 -0700 |
commit | 2b462638e41ea62230297c21c4da9955937b7a3c (patch) | |
tree | 8f19675d518b40df09e7d21aa04c785eb5e303b8 /fs/ocfs2/cluster | |
parent | 4df4185a596c7301be0d8e1fdf691ec03e57cd23 (diff) | |
download | linux-2b462638e41ea62230297c21c4da9955937b7a3c.tar.bz2 |
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 'fs/ocfs2/cluster')
0 files changed, 0 insertions, 0 deletions