mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Morris <jmorris@namei.org>
To: Andrew Morton <akpm@osdl.org>
Cc: Tony Griffiths <tonyg@agile.tv>, linux-kernel@vger.kernel.org
Subject: Re: Some socket syscalls fail to return an error on bad file-descriptor# argument
Date: Thu, 1 Jun 2006 03:21:02 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0606010320140.12929@d.namei> (raw)
In-Reply-To: <20060531214116.ef2d1c3e.akpm@osdl.org>

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>

      reply	other threads:[~2006-06-01  7:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-01  3:38 Tony Griffiths
2006-06-01  4:33 ` Hua Zhong
2006-06-01  4:41 ` Andrew Morton
2006-06-01  7:21   ` James Morris [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=Pine.LNX.4.64.0606010320140.12929@d.namei \
    --to=jmorris@namei.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tonyg@agile.tv \
    /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

all inboxes | Powered by JetHome®