diff options
author | Ilija Hadzic <ihadzic@research.bell-labs.com> | 2013-04-02 09:56:10 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-12 09:52:04 -0700 |
commit | 4f0405710480beec4cef54697c693df217e969a1 (patch) | |
tree | 62dd2910f88bc4b1a0a8b5b80f2977f940582863 /mm/page-writeback.c | |
parent | d7ca2c16dd8896ba4daa7a674b36ee6025b15e94 (diff) | |
download | lwn-4f0405710480beec4cef54697c693df217e969a1.tar.gz lwn-4f0405710480beec4cef54697c693df217e969a1.zip |
drm: correctly restore mappings if drm_open fails
commit a8ec3a662921220fc058ed6f7f3674697876d218 upstream.
If first drm_open fails, the error-handling path will
incorrectly restore inode's mapping to NULL. This can
cause the crash later on. Fix by separately storing
away mapping pointers that drm_open can touch and
restore each from its own respective variable if the
call fails.
Fixes: https://bugzilla.novell.com/show_bug.cgi?id=807850
(thanks to Michal Hocko for investigating investigating and
finding the root cause of the bug)
Reference:
http://lists.freedesktop.org/archives/dri-devel/2013-March/036564.html
v2: Use one variable to store file and inode mapping
since they are the same at the function entry.
Fix spelling mistakes in commit message.
v3: Add reference to the original bug report.
Reported-by: Marco Munderloh <munderl@tnt.uni-hannover.de>
Tested-by: Marco Munderloh <munderl@tnt.uni-hannover.de>
Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
Cc: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm/page-writeback.c')
0 files changed, 0 insertions, 0 deletions