svn commit: r364685 - stable/12/sys/compat/linux
Edward Tomasz Napierala
trasz at FreeBSD.org
Mon Aug 24 14:05:46 UTC 2020
Author: trasz
Date: Mon Aug 24 14:05:45 2020
New Revision: 364685
URL: https://svnweb.freebsd.org/changeset/base/364685
Log:
MFC r354805:
Make linux(4) open(2)/openat(2) return ELOOP instead of EMLINK,
when being passed O_NOFOLLOW. This fixes LTP testcase openat02:5.
Sponsored by: The FreeBSD Foundation
Modified:
stable/12/sys/compat/linux/linux_file.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/compat/linux/linux_file.c
==============================================================================
--- stable/12/sys/compat/linux/linux_file.c Mon Aug 24 14:04:59 2020 (r364684)
+++ stable/12/sys/compat/linux/linux_file.c Mon Aug 24 14:05:45 2020 (r364685)
@@ -135,8 +135,11 @@ linux_common_open(struct thread *td, int dirfd, char *
/* XXX LINUX_O_NOATIME: unable to be easily implemented. */
error = kern_openat(td, dirfd, path, UIO_SYSSPACE, bsd_flags, mode);
- if (error != 0)
+ if (error != 0) {
+ if (error == EMLINK)
+ error = ELOOP;
goto done;
+ }
if (bsd_flags & O_NOCTTY)
goto done;
More information about the svn-src-stable-12
mailing list