From: Andrew Morton <akpm@linux-foundation.org>
To: ff@ozog.com
Cc: bugme-daemon@bugzilla.kernel.org, netdev@vger.kernel.org
Subject: Re: [Bugme-new] [Bug 9132] New: fcntl GET_OWN reports 0 for sockets instead of PID
Date: Mon, 8 Oct 2007 10:11:29 -0700 [thread overview]
Message-ID: <20071008101129.c5af10e1.akpm@linux-foundation.org> (raw)
In-Reply-To: <bug-9132-10286@http.bugzilla.kernel.org/>
(please respond via emailed reply-to-all, not vie the bugzilla web interface)
On Mon, 8 Oct 2007 09:18:02 -0700 (PDT) bugme-daemon@bugzilla.kernel.org wrote:
> http://bugzilla.kernel.org/show_bug.cgi?id=9132
>
> Summary: fcntl GET_OWN reports 0 for sockets instead of PID
> Product: Networking
> Version: 2.5
> KernelVersion: 2.6.22
> Platform: All
> OS/Version: Linux
> Tree: Mainline
> Status: NEW
> Severity: normal
> Priority: P1
> Component: Other
> AssignedTo: acme@ghostprotocols.net
> ReportedBy: ff@ozog.com
>
>
> Most recent kernel where this bug did not occur: 2.6.22
> Distribution: Kubuntu
> Hardware Environment: VMWare workstation 6
> Software Environment:
> Problem Description: calling fcntl with F_GETOWN on a socket gives allways zero
> instead of the PID of the socket. The fcntl code is right but the data is zero
> in the struct file element. It sounds like pid is not set when the socket is
> attached to the fd in sock_attach_fd() of net/socket.c.
>
> I would add something like this:
>
> file->f_owner.pid=find_get_pid(task->pid);
> file->f_owner.pid_type=PIDTYPE_PID;
>
> in sock_attach_fd() of net/socket.c
>
> Steps to reproduce:
>
> s=socket(...);
> pid=fcntl(s, F_GETOWN);
>
You state that the problem is present in 2.6.22 and also did not occur in
2.6.22. I assume it has always been like this.
next parent reply other threads:[~2007-10-08 17:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-9132-10286@http.bugzilla.kernel.org/>
2007-10-08 17:11 ` Andrew Morton [this message]
2007-10-08 18:16 [Bugme-new] [Bug 9132] New: fcntl GET_OWN reports 0 for sockets instead of PID François-Frédéric Ozog
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=20071008101129.c5af10e1.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=bugme-daemon@bugzilla.kernel.org \
--cc=ff@ozog.com \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).