* BUG at /net/ipx/af_ipx.c
@ 2018-12-15 4:14 tenys
2018-12-15 6:22 ` Stephen Hemminger
0 siblings, 1 reply; 2+ messages in thread
From: tenys @ 2018-12-15 4:14 UTC (permalink / raw)
To: netdev
it looks like a pointer stored without holding a reference
for the source code in kernel version v4.14.88, and the fuction is : ipxitf_insert_socket
static void ipxitf_insert_socket(struct ipx_interface *intrfc, struct sock *sk)
{ ipxitf_hold(intrfc);
spin_lock_bh(&intrfc->if_sklist_lock);
ipx_sk(sk)->intrfc = intrfc;
sk_add_node(sk, &intrfc->if_sklist);
spin_unlock_bh(&intrfc->if_sklist_lock);
ipxitf_put(intrfc);
}
it assigned the pointer `intrfc` to `sk->intrfc`, but didn't hold a reference for this pointer.
it looks like a bug.....if not ,could you please explain the meaning of it?
thanks a lot!
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: BUG at /net/ipx/af_ipx.c
2018-12-15 4:14 BUG at /net/ipx/af_ipx.c tenys
@ 2018-12-15 6:22 ` Stephen Hemminger
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2018-12-15 6:22 UTC (permalink / raw)
To: tenys; +Cc: netdev
On Sat, 15 Dec 2018 12:14:41 +0800 (CST)
tenys <15667082669@163.com> wrote:
> it looks like a pointer stored without holding a reference
> for the source code in kernel version v4.14.88, and the fuction is : ipxitf_insert_socket
>
> static void ipxitf_insert_socket(struct ipx_interface *intrfc, struct sock *sk)
> { ipxitf_hold(intrfc);
> spin_lock_bh(&intrfc->if_sklist_lock);
> ipx_sk(sk)->intrfc = intrfc;
> sk_add_node(sk, &intrfc->if_sklist);
> spin_unlock_bh(&intrfc->if_sklist_lock);
> ipxitf_put(intrfc);
> }
>
> it assigned the pointer `intrfc` to `sk->intrfc`, but didn't hold a reference for this pointer.
> it looks like a bug.....if not ,could you please explain the meaning of it?
> thanks a lot!
>
>
>
>
>
>
>
>
>
>
>
IPX ha been removed in later kernels.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-12-15 6:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-15 4:14 BUG at /net/ipx/af_ipx.c tenys
2018-12-15 6:22 ` Stephen Hemminger
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).