Debian Bug report logs - #379297
epoll_ctl manual error

version graph

Package: manpages-dev; Maintainer for manpages-dev is Martin Schulze <joey@debian.org>; Source for manpages-dev is src:manpages.

Reported by: "Frank van Viegen" <F.C.vanViegen@UTwente.nl>

Date: Sat, 22 Jul 2006 17:04:27 UTC

Severity: normal

Tags: fixed-upstream

Found in version manpages/2.34-1

Fixed in version manpages/2.37-1

Done: Martin Schulze <joey@infodrom.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#379297; Package manpages-dev. Full text and rfc822 format available.

Acknowledgement sent to "Frank van Viegen" <F.C.vanViegen@UTwente.nl>:
New Bug report received and forwarded. Copy sent to Martin Schulze <joey@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: "Frank van Viegen" <F.C.vanViegen@UTwente.nl>
To: submit@bugs.debian.org
Subject: epoll_ctl manual error
Date: Sat, 22 Jul 2006 18:57:00 +0200
Package: manpages-dev
Version: 2.34-1

The epoll_ctl(2) man page states:

ERRORS
      EBADF  epfd is not a valid file descriptor.

However, based upon actual kernel (2.6.11-9-em64t-p4-smp) behaviour it
should probably read:

ERRORS
      EBADF  fd is not a valid file descriptor.



Information forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#379297; Package manpages-dev. Full text and rfc822 format available.

Acknowledgement sent to Martin Schulze <joey@infodrom.org>:
Extra info received and forwarded to list. Copy sent to Martin Schulze <joey@debian.org>. Full text and rfc822 format available.

Message #10 received at 379297@bugs.debian.org (full text, mbox):

From: Martin Schulze <joey@infodrom.org>
To: Frank van Viegen <F.C.vanViegen@UTwente.nl>
Cc: 379297@bugs.debian.org
Subject: Re: epoll_ctl manual error
Date: Wed, 26 Jul 2006 17:42:43 +0200
Frank van Viegen wrote:
> Package: manpages-dev
> Version: 2.34-1
> 
> The epoll_ctl(2) man page states:
> 
> ERRORS
>       EBADF  epfd is not a valid file descriptor.
> 
> However, based upon actual kernel (2.6.11-9-em64t-p4-smp) behaviour it
> should probably read:
> 
> ERRORS
>       EBADF  fd is not a valid file descriptor.

What makes you think this is true?

Looking into sys_epoll_ctl() in fs/eventpoll.c of 2.6.16 I find

[..]
        /* Get the "struct file *" for the eventpoll file */
        error = -EBADF;
        file = fget(epfd);
        if (!file)
                goto eexit_1;
[..]
eexit_1:
        DNPRINTK(3, (KERN_INFO "[%p] eventpoll: sys_epoll_ctl(%d, %d, %d, %p) = %d\n",
                     current, epfd, op, fd, event, error));

        return error;

So, looking at the code, EBADF refers to epfd and not to fd, just
as it is documented in the manual page.

Regards,

	Joey

-- 
GNU does not eliminate all the world's problems, only some of them.
                                                -- The GNU Manifesto

Please always Cc to me when replying to me on the lists.



Information forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#379297; Package manpages-dev. Full text and rfc822 format available.

Acknowledgement sent to "Frank van Viegen" <F.C.vanViegen@UTwente.nl>:
Extra info received and forwarded to list. Copy sent to Martin Schulze <joey@debian.org>. Full text and rfc822 format available.

Message #15 received at 379297@bugs.debian.org (full text, mbox):

From: "Frank van Viegen" <F.C.vanViegen@UTwente.nl>
To: "Martin Schulze" <joey@infodrom.org>
Cc: 379297@bugs.debian.org
Subject: Re: epoll_ctl manual error
Date: Wed, 26 Jul 2006 19:56:36 +0200
On 7/26/06, Martin Schulze <joey@infodrom.org> wrote:
> So, looking at the code, EBADF refers to epfd and not to fd, just
> as it is documented in the manual page.

Extending your source quote by a few lines:

    /* Get the "struct file *" for the eventpoll file */
    error = -EBADF;
    file = fget(epfd);
    if (!file)
        goto eexit_1;

    /* Get the "struct file *" for the target file */
    tfile = fget(fd);
    if (!tfile)
        goto eexit_2;

So EBADF refers to BOTH epfd and fd. Sorry I neglected to check that
possibility before filing the original report. New suggestion:

ERRORS
      EBADF  epfd and/or fd is not a valid file descriptor.

Regards,
--Frank



Information forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#379297; Package manpages-dev. Full text and rfc822 format available.

Acknowledgement sent to Michael Kerrisk <mtk-manpages@gmx.net>:
Extra info received and forwarded to list. Copy sent to Martin Schulze <joey@debian.org>. Full text and rfc822 format available.

Message #20 received at 379297@bugs.debian.org (full text, mbox):

From: Michael Kerrisk <mtk-manpages@gmx.net>
To: Frank van Viegen <F.C.vanViegen@UTwente.nl>, 379297@bugs.debian.org
Cc: debc <control@bugs.debian.org>
Subject: Re: Bug#379297: epoll_ctl manual error
Date: Sat, 22 Jul 2006 19:38:22 +0200
tags 379297 fixed-upstream
thanks

Frank van Viegen wrote:
> Package: manpages-dev
> Version: 2.34-1
> 
> The epoll_ctl(2) man page states:
> 
> ERRORS
>       EBADF  epfd is not a valid file descriptor.
> 
> However, based upon actual kernel (2.6.11-9-em64t-p4-smp) behaviour it
> should probably read:
> 
> ERRORS
>       EBADF  fd is not a valid file descriptor.

Hello Frank,

Thanks for your report.  In fact the text should be:

     EBADF  epfd or fd is not a valid file descriptor.

I've made that change for man-pages-2.37.

Cheers,

Michael

-- 
Michael Kerrisk
maintainer of Linux man pages Sections 2, 3, 4, 5, and 7

Want to help with man page maintenance?  Grab the latest tarball at
ftp://ftp.win.tue.nl/pub/linux-local/manpages/,
read the HOWTOHELP file and grep the source files for 'FIXME'.




Tags added: fixed-upstream Request was from Michael Kerrisk <mtk-manpages@gmx.net> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#379297; Package manpages-dev. Full text and rfc822 format available.

Acknowledgement sent to Michael Kerrisk <mtk-manpages@gmx.net>:
Extra info received and forwarded to list. Copy sent to Martin Schulze <joey@debian.org>. Full text and rfc822 format available.

Tags added: fixed-upstream Request was from Michael Kerrisk <mtk-manpages@gmx.net> to control@bugs.debian.org. Full text and rfc822 format available.

Reply sent to Martin Schulze <joey@infodrom.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to "Frank van Viegen" <F.C.vanViegen@UTwente.nl>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #34 received at 379297-close@bugs.debian.org (full text, mbox):

From: Martin Schulze <joey@infodrom.org>
To: 379297-close@bugs.debian.org
Subject: Bug#379297: fixed in manpages 2.37-1
Date: Wed, 09 Aug 2006 08:17:10 -0700
Source: manpages
Source-Version: 2.37-1

We believe that the bug you reported is fixed in the latest version of
manpages, which is due to be installed in the Debian FTP archive:

manpages-dev_2.37-1_all.deb
  to pool/main/m/manpages/manpages-dev_2.37-1_all.deb
manpages_2.37-1.diff.gz
  to pool/main/m/manpages/manpages_2.37-1.diff.gz
manpages_2.37-1.dsc
  to pool/main/m/manpages/manpages_2.37-1.dsc
manpages_2.37-1_all.deb
  to pool/main/m/manpages/manpages_2.37-1_all.deb
manpages_2.37.orig.tar.gz
  to pool/main/m/manpages/manpages_2.37.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 379297@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Martin Schulze <joey@infodrom.org> (supplier of updated manpages package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Wed,  9 Aug 2006 17:00:38 +0200
Source: manpages
Binary: manpages manpages-dev
Architecture: source all
Version: 2.37-1
Distribution: unstable
Urgency: low
Maintainer: Martin Schulze <joey@debian.org>
Changed-By: Martin Schulze <joey@infodrom.org>
Description: 
 manpages   - Manual pages about using a GNU/Linux system
 manpages-dev - Manual pages about using GNU/Linux for development
Closes: 378544 379297
Changes: 
 manpages (2.37-1) unstable; urgency=low
 .
   * New upstream version
     . Various formatting fixes (closes: Bug#378544)
     . Add text noting that effective IDs are copied to saved set-IDs
       during execve(2) (closes:  Bug#379297)
Files: 
 d8473fcd55f7f5f2386d24fa16a10237 584 doc - manpages_2.37-1.dsc
 ed53c204bdcd4878ac878ddb07069322 1192989 doc - manpages_2.37.orig.tar.gz
 bf3e9a249cc8eabe9a5e84f65683e6be 54619 doc - manpages_2.37-1.diff.gz
 2dea063860179a548e4ac3f8e914b42d 481640 doc important manpages_2.37-1_all.deb
 c10f692b2cfd3d29b286d26ed30e8964 1218048 doc standard manpages-dev_2.37-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFE2ft+W5ql+IAeqTIRAmsnAJ9F5NtaBROE+UOX3Q3wL/TPlNFccQCfVV/A
U4gQlcodEBOK3ZE4Aak5Pkw=
=SreP
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Wed, 27 Jun 2007 08:00:49 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Apr 21 12:18:06 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.