Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1641855
| From | Christoph Hellwig <hch@lst.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/2] coredump: call do_unlinkat directly instead of sys_unlink |
| Date | 2017-05-15 18:00 +0200 |
| Message-ID | <tHqzF-1DW-33@gated-at.bofh.it> (permalink) |
| References | <tHqzF-1DW-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
And stop messing with the address limit.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/coredump.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/fs/coredump.c b/fs/coredump.c
index 592683711c64..10a020639a94 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -679,16 +679,11 @@ void do_coredump(const siginfo_t *siginfo)
* privs and don't want to unlink another user's coredump.
*/
if (!need_suid_safe) {
- mm_segment_t old_fs;
-
- old_fs = get_fs();
- set_fs(KERNEL_DS);
/*
* If it doesn't exist, that's fine. If there's some
* other problem, we'll catch it at the filp_open().
*/
- (void) sys_unlink((const char __user *)cn.corename);
- set_fs(old_fs);
+ do_unlinkat(AT_FDCWD, getname_kernel(cn.corename));
}
/*
--
2.11.0
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 1/2] fs: expose do_unlinkat for built-in callers Christoph Hellwig <hch@lst.de> - 2017-05-15 18:00 +0200 [PATCH 2/2] coredump: call do_unlinkat directly instead of sys_unlink Christoph Hellwig <hch@lst.de> - 2017-05-15 18:00 +0200
csiph-web