From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Eric Blake <ebb9@byu.net>
Cc: Andrew Morton <akpm@linux-foundation.org>,
bugzilla-daemon@bugzilla.kernel.org,
bugme-daemon@bugzilla.kernel.org,
Ulrich Drepper <drepper@redhat.com>,
Alexey Dobriyan <adobriyan@gmail.com>,
Michael Kerrisk <mtk.manpages@googlemail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [Bugme-new] [Bug 14832] New: futimens (AT_FDCWD, arg) should fail
Date: Thu, 24 Dec 2009 20:03:14 +0900 [thread overview]
Message-ID: <87vdfwk51p.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <4B321663.2050603@byu.net> (Eric Blake's message of "Wed, 23 Dec 2009 06:08:51 -0700")
Eric Blake <ebb9@byu.net> writes:
>> afacit, if filename==NULL and dfd==-1 then fget() will return NULL and
>> the syscall returns -EBAFD.
>
> Yes, that's true if dfd==-1. But My complaint was not about dfd==-1, but
> about dfd==AT_FDCWD, in which case, this block of code is skipped, and you
> end up operating on the current directory ".". My point is that the line:
> if (filename == NULL && dfd != AT_FDCWD) {
> should probably be:
> if (filename == NULL) {
> assuming that fget(AT_FDCWD) likewise fails.
No, it changes utimensat() behavior. If error was EBADF, it seems fd
shouldn't be AT_FDCWD. So, this behavior would be right thing as
utimensat().
[EBADF] The path argument does not specify an absolute path and the fd
argument is neither AT_FDCWD nor a valid file descriptor open for
reading or searching.
>> Your report doesn't tell us what kernel version you're testing. We did
>> fix a few things ni this area, but it was a long time ago.
>
> Yesterday, Ulrich patched glibc to avoid the issue from the library side
> of things (I first raised the report against glibc 2 months ago, along
> with a proposed patch:
> http://sources.redhat.com/bugzilla/show_bug.cgi?id=10992). But there is
> still the case of newer kernels and unpatched glibc, where it would also
> be nice to patch the kernel. I reproduced the bug on
> 2.6.31.6-166.fc12.i686, where this test (part of coreutils' configure
> script) failed with status 2:
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
prev parent reply other threads:[~2009-12-24 11:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-14832-10286@http.bugzilla.kernel.org/>
2009-12-22 22:31 ` [Bugme-new] [Bug 14832] New: futimens (AT_FDCWD, arg) should fail Andrew Morton
2009-12-23 13:08 ` Eric Blake
2009-12-24 11:03 ` OGAWA Hirofumi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vdfwk51p.fsf@devron.myhome.or.jp \
--to=hirofumi@mail.parknet.co.jp \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=bugme-daemon@bugzilla.kernel.org \
--cc=bugzilla-daemon@bugzilla.kernel.org \
--cc=drepper@redhat.com \
--cc=ebb9@byu.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mtk.manpages@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox