lkml.org 
[lkml]   [2006]   [Jun]   [1]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateThu, 1 Jun 2006 03:21:02 -0400 (EDT)
FromJames Morris <>
SubjectRe: Some socket syscalls fail to return an error on bad file-descriptor# argument
On Wed, 31 May 2006, Andrew Morton wrote:

> Confused.  That patch cannot make any difference to this function:

Yep, the code definitely looks correct in current LT git.

> static struct socket *sockfd_lookup_light(int fd, int *err, int *fput_needed)
> {
> 	struct file *file;
> 	struct socket *sock;
> 
> 	*err = -EBADF;
> 	file = fget_light(fd, fput_needed);
> 	if (file) {
> 		sock = sock_from_file(file, err);
> 		if (sock)
> 			return sock;
> 		fput_light(file, *fput_needed);
> 	}
> 	return NULL;
> }



- James
-- 
James Morris
<jmorris@namei.org>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-01 07:24    [from the cache]
©2003-2008