Date: Mon, 24 Aug 2020 14:05:45 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364685 - stable/12/sys/compat/linux Message-ID: <202008241405.07OE5jrU086025@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008241405.07OE5jrU086025>