diff options
| author | Julius Werner <jwerner@chromium.org> | 2017-06-02 15:36:39 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-06-14 13:16:26 +0200 |
| commit | 983c09ebdbc2c047b608021411d70d5c4404b1a6 (patch) | |
| tree | 9a7fb07831a01db6d8288804c740c7bc2c672c9b /drivers/tty/tty_io.c | |
| parent | 9a9388953bdcd416f94991f3bd19ea9bc2b31930 (diff) | |
drivers: char: mem: Fix wraparound check to allow mappings up to the end
commit 32829da54d9368103a2f03269a5120aa9ee4d5da upstream.
A recent fix to /dev/mem prevents mappings from wrapping around the end
of physical address space. However, the check was written in a way that
also prevents a mapping reaching just up to the end of physical address
space, which may be a valid use case (especially on 32-bit systems).
This patch fixes it by checking the last mapped address (instead of the
first address behind that) for overflow.
Fixes: b299cde245 ("drivers: char: mem: Check for address space wraparound with mmap()")
Reported-by: Nico Huber <nico.h@gmx.de>
Signed-off-by: Julius Werner <jwerner@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/tty_io.c')
0 files changed, 0 insertions, 0 deletions
