New: fcntl GET_OWN reports 0 for sockets instead of PID
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]/
(please respond via emailed reply-to-all, not vie the bugzilla web interface)
Quoted 31 lines · On Mon, 8 Oct 2007 09:18:02 -0700 (PDT) [email protected] 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: [email protected] ReportedBy: [email protected]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 withF_GETOWNon 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 insock_attach_fd()ofnet/socket.c.I would add something like this:
file->f_owner.pid=find_get_pid(task->pid);
file->f_owner.pid_type=PIDTYPE_PID;
Quoted 7 lines
in
sock_attach_fd()ofnet/socket.cSteps 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.