diff options
author | Christoph Hellwig <hch@lst.de> | 2017-11-04 06:44:46 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2017-11-10 08:48:49 -0500 |
commit | 96271654f55c74ff7325fbdfc535466c9deb0ce6 (patch) | |
tree | 01a9c73ca27c828de7df07a6bdba2fbab980e98c /fs/coredump.c | |
parent | da2f1362c8bdf187c171a59a2c84b8ed3566d5fe (diff) |
coredump: call do_unlinkat directly instead of sys_unlink
And stop messing with the address limit.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/coredump.c')
-rw-r--r-- | fs/coredump.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/coredump.c b/fs/coredump.c index 0eec03696707..cd72a4ca0cec 100644 --- a/fs/coredump.c +++ b/fs/coredump.c | |||
@@ -679,16 +679,11 @@ void do_coredump(const siginfo_t *siginfo) | |||
679 | * privs and don't want to unlink another user's coredump. | 679 | * privs and don't want to unlink another user's coredump. |
680 | */ | 680 | */ |
681 | if (!need_suid_safe) { | 681 | if (!need_suid_safe) { |
682 | mm_segment_t old_fs; | ||
683 | |||
684 | old_fs = get_fs(); | ||
685 | set_fs(KERNEL_DS); | ||
686 | /* | 682 | /* |
687 | * If it doesn't exist, that's fine. If there's some | 683 | * If it doesn't exist, that's fine. If there's some |
688 | * other problem, we'll catch it at the filp_open(). | 684 | * other problem, we'll catch it at the filp_open(). |
689 | */ | 685 | */ |
690 | (void) sys_unlink((const char __user *)cn.corename); | 686 | do_unlinkat(AT_FDCWD, getname_kernel(cn.corename)); |
691 | set_fs(old_fs); | ||
692 | } | 687 | } |
693 | 688 | ||
694 | /* | 689 | /* |