diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2016-09-20 23:20:32 +0200 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2016-09-20 23:20:32 +0200 |
| commit | 464b5847e61085f81bb99ce48eb427a0dc7617dc (patch) | |
| tree | 805c97855a9a13c06910687bbbbe3eb7bc371902 /arch/hexagon/include/asm/uaccess.h | |
| parent | 0a30d69195604f136a4e3bfaf453f742e583ce95 (diff) | |
| parent | e875bd66dfb68f4e898e9a43ef42858c504a7f23 (diff) | |
| download | linux-464b5847e61085f81bb99ce48eb427a0dc7617dc.tar.gz linux-464b5847e61085f81bb99ce48eb427a0dc7617dc.tar.bz2 linux-464b5847e61085f81bb99ce48eb427a0dc7617dc.zip | |
Merge branch 'irq/urgent' into irq/core
Merge urgent fixes so pending patches for 4.9 can be applied.
Diffstat (limited to 'arch/hexagon/include/asm/uaccess.h')
| -rw-r--r-- | arch/hexagon/include/asm/uaccess.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/hexagon/include/asm/uaccess.h b/arch/hexagon/include/asm/uaccess.h index f000a382bc7f..f61cfb28e9f2 100644 --- a/arch/hexagon/include/asm/uaccess.h +++ b/arch/hexagon/include/asm/uaccess.h @@ -103,7 +103,8 @@ static inline long hexagon_strncpy_from_user(char *dst, const char __user *src, { long res = __strnlen_user(src, n); - /* return from strnlen can't be zero -- that would be rubbish. */ + if (unlikely(!res)) + return -EFAULT; if (res > n) { copy_from_user(dst, src, n); |
