* compat_sock_common_getsockopt typo?
@ 2007-03-05 23:26 Johannes Berg
2007-03-06 14:43 ` James Morris
0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2007-03-05 23:26 UTC (permalink / raw)
To: netdev
[-- Attachment #1: Type: text/plain, Size: 754 bytes --]
The function reads as follows:
int compat_sock_common_getsockopt(struct socket *sock, int level, int optname,
char __user *optval, int __user *optlen)
{
struct sock *sk = sock->sk;
if (sk->sk_prot->compat_setsockopt != NULL)
^^^
return sk->sk_prot->compat_getsockopt(sk, level, optname,
^^^
optval, optlen);
return sk->sk_prot->getsockopt(sk, level, optname, optval, optlen);
}
EXPORT_SYMBOL(compat_sock_common_getsockopt);
Is that intentional to make protocol writers assign both if they want
compat_setsockopt? :P
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: compat_sock_common_getsockopt typo?
2007-03-05 23:26 compat_sock_common_getsockopt typo? Johannes Berg
@ 2007-03-06 14:43 ` James Morris
2007-03-06 14:45 ` [PATCH] fix compat_sock_common_getsockopt typo Johannes Berg
0 siblings, 1 reply; 5+ messages in thread
From: James Morris @ 2007-03-06 14:43 UTC (permalink / raw)
To: Johannes Berg; +Cc: netdev
On Tue, 6 Mar 2007, Johannes Berg wrote:
> The function reads as follows:
>
> int compat_sock_common_getsockopt(struct socket *sock, int level, int optname,
> char __user *optval, int __user *optlen)
> {
> struct sock *sk = sock->sk;
>
> if (sk->sk_prot->compat_setsockopt != NULL)
> ^^^
>
> return sk->sk_prot->compat_getsockopt(sk, level, optname,
> ^^^
> optval, optlen);
> return sk->sk_prot->getsockopt(sk, level, optname, optval, optlen);
> }
> EXPORT_SYMBOL(compat_sock_common_getsockopt);
>
> Is that intentional to make protocol writers assign both if they want
> compat_setsockopt? :P
It's a bug.
--
James Morris
<jmorris@namei.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] fix compat_sock_common_getsockopt typo
2007-03-06 14:43 ` James Morris
@ 2007-03-06 14:45 ` Johannes Berg
2007-03-06 15:06 ` James Morris
0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2007-03-06 14:45 UTC (permalink / raw)
To: James Morris; +Cc: netdev, David S. Miller
This patch fixes a typo in compat_sock_common_getsockopt.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
--- wireless-dev.orig/net/core/sock.c 2007-03-06 15:44:15.618565674 +0100
+++ wireless-dev/net/core/sock.c 2007-03-06 15:44:25.948565674 +0100
@@ -1597,7 +1597,7 @@ int compat_sock_common_getsockopt(struct
{
struct sock *sk = sock->sk;
- if (sk->sk_prot->compat_setsockopt != NULL)
+ if (sk->sk_prot->compat_getsockopt != NULL)
return sk->sk_prot->compat_getsockopt(sk, level, optname,
optval, optlen);
return sk->sk_prot->getsockopt(sk, level, optname, optval, optlen);
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fix compat_sock_common_getsockopt typo
2007-03-06 14:45 ` [PATCH] fix compat_sock_common_getsockopt typo Johannes Berg
@ 2007-03-06 15:06 ` James Morris
2007-03-06 21:44 ` David Miller
0 siblings, 1 reply; 5+ messages in thread
From: James Morris @ 2007-03-06 15:06 UTC (permalink / raw)
To: Johannes Berg; +Cc: netdev, David S. Miller
On Tue, 6 Mar 2007, Johannes Berg wrote:
> This patch fixes a typo in compat_sock_common_getsockopt.
>
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
>
> --- wireless-dev.orig/net/core/sock.c 2007-03-06 15:44:15.618565674 +0100
> +++ wireless-dev/net/core/sock.c 2007-03-06 15:44:25.948565674 +0100
> @@ -1597,7 +1597,7 @@ int compat_sock_common_getsockopt(struct
> {
> struct sock *sk = sock->sk;
>
> - if (sk->sk_prot->compat_setsockopt != NULL)
> + if (sk->sk_prot->compat_getsockopt != NULL)
> return sk->sk_prot->compat_getsockopt(sk, level, optname,
> optval, optlen);
> return sk->sk_prot->getsockopt(sk, level, optname, optval, optlen);
Acked-by: James Morris <jmorris@namei.org>
--
James Morris
<jmorris@namei.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fix compat_sock_common_getsockopt typo
2007-03-06 15:06 ` James Morris
@ 2007-03-06 21:44 ` David Miller
0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2007-03-06 21:44 UTC (permalink / raw)
To: jmorris; +Cc: johannes, netdev
From: James Morris <jmorris@namei.org>
Date: Tue, 6 Mar 2007 10:06:00 -0500 (EST)
> On Tue, 6 Mar 2007, Johannes Berg wrote:
>
> > This patch fixes a typo in compat_sock_common_getsockopt.
> >
> > Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
> >
> > --- wireless-dev.orig/net/core/sock.c 2007-03-06 15:44:15.618565674 +0100
> > +++ wireless-dev/net/core/sock.c 2007-03-06 15:44:25.948565674 +0100
> > @@ -1597,7 +1597,7 @@ int compat_sock_common_getsockopt(struct
> > {
> > struct sock *sk = sock->sk;
> >
> > - if (sk->sk_prot->compat_setsockopt != NULL)
> > + if (sk->sk_prot->compat_getsockopt != NULL)
> > return sk->sk_prot->compat_getsockopt(sk, level, optname,
> > optval, optlen);
> > return sk->sk_prot->getsockopt(sk, level, optname, optval, optlen);
>
>
> Acked-by: James Morris <jmorris@namei.org>
Applied, thanks evryone.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-03-06 21:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-05 23:26 compat_sock_common_getsockopt typo? Johannes Berg
2007-03-06 14:43 ` James Morris
2007-03-06 14:45 ` [PATCH] fix compat_sock_common_getsockopt typo Johannes Berg
2007-03-06 15:06 ` James Morris
2007-03-06 21:44 ` David Miller
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).