diff options
| author | Ben Hutchings <ben@decadent.org.uk> | 2014-08-29 15:18:58 -0700 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2017-06-17 15:51:58 +0200 |
| commit | 915106fd1b45687cabfa546b77613239c2d95995 (patch) | |
| tree | 6cc3a61a8e795d7ad24a1dbaededd6de540d7251 /drivers/gpu | |
| parent | 2e1ceb558eb608e8d244ea5731a2ad748c6babc2 (diff) | |
ocfs2: do not write error flag to user structure we cannot copy from/to
commit 2b462638e41ea62230297c21c4da9955937b7a3c upstream.
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>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'drivers/gpu')
0 files changed, 0 insertions, 0 deletions
