mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 02:30:52 +07:00
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>
This commit is contained in:
parent
da2f1362c8
commit
96271654f5
@ -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));
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user