netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: tenys <15667082669@163.com>
Cc: netdev@vger.kernel.org
Subject: Re: BUG at /net/ipx/af_ipx.c
Date: Fri, 14 Dec 2018 22:22:42 -0800	[thread overview]
Message-ID: <20181214222242.5342453c@xeon-e3> (raw)
In-Reply-To: <7d97ca5d.5dbd.167b012ce43.Coremail.15667082669@163.com>

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.

      reply	other threads:[~2018-12-15  6:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-15  4:14 BUG at /net/ipx/af_ipx.c tenys
2018-12-15  6:22 ` Stephen Hemminger [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=20181214222242.5342453c@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=15667082669@163.com \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).