From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: BUG at /net/ipx/af_ipx.c Date: Fri, 14 Dec 2018 22:22:42 -0800 Message-ID: <20181214222242.5342453c@xeon-e3> References: <7d97ca5d.5dbd.167b012ce43.Coremail.15667082669@163.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: netdev@vger.kernel.org To: tenys <15667082669@163.com> Return-path: Received: from mail-pl1-f180.google.com ([209.85.214.180]:42331 "EHLO mail-pl1-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727757AbeLOGWu (ORCPT ); Sat, 15 Dec 2018 01:22:50 -0500 Received: by mail-pl1-f180.google.com with SMTP id y1so3698311plp.9 for ; Fri, 14 Dec 2018 22:22:50 -0800 (PST) In-Reply-To: <7d97ca5d.5dbd.167b012ce43.Coremail.15667082669@163.com> Sender: netdev-owner@vger.kernel.org List-ID: 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=C2=A0 in kernel version v4.14.88, and the fuction is = : ipxitf_insert_socket >=20 > static void ipxitf_insert_socket(struct ipx_interface *intrfc, struct soc= k *sk) > { ipxitf_hold(intrfc); > spin_lock_bh(&intrfc->if_sklist_lock); > ipx_sk(sk)->intrfc =3D intrfc; > sk_add_node(sk, &intrfc->if_sklist); > spin_unlock_bh(&intrfc->if_sklist_lock); > ipxitf_put(intrfc); > } >=20 > it assigned the pointer `intrfc` to `sk->intrfc`,=C2=A0 but didn't hold a= reference for this pointer. > it looks like a bug.....if not ,could you please explain the meaning of i= t? > thanks a lot=EF=BC=81 >=20 >=20 >=20 >=20 >=20 >=20 > =C2=A0 >=20 >=20 >=20 > =C2=A0 IPX ha been removed in later kernels.