From: Andrew Morton <akpm@osdl.org>
To: Tony Griffiths <tonyg@agile.tv>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Some socket syscalls fail to return an error on bad file-descriptor# argument
Date: Wed, 31 May 2006 21:41:16 -0700 [thread overview]
Message-ID: <20060531214116.ef2d1c3e.akpm@osdl.org> (raw)
In-Reply-To: <447E614F.3090905@agile.tv>
On Thu, 01 Jun 2006 13:38:55 +1000
Tony Griffiths <tonyg@agile.tv> wrote:
> diff -urpN ./net/socket.c.orig ./net/socket.c
> --- ./net/socket.c.orig 2006-06-01 10:28:30.000000000 +1000
> +++ ./net/socket.c 2006-06-01 10:34:09.000000000 +1000
> @@ -496,6 +496,8 @@ static struct socket *sockfd_lookup_ligh
> if (sock)
> return sock;
> fput_light(file, *fput_needed);
> + } else {
> + *err = -EBADF;
> }
> return NULL;
> }
Confused. That patch cannot make any difference to this function:
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;
}
next prev parent reply other threads:[~2006-06-01 4:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-01 3:38 Some socket syscalls fail to return an error on bad file-descriptor# argument Tony Griffiths
2006-06-01 4:33 ` Hua Zhong
2006-06-01 4:41 ` Andrew Morton [this message]
2006-06-01 7:21 ` James Morris
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=20060531214116.ef2d1c3e.akpm@osdl.org \
--to=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