Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1278355yba; Thu, 9 May 2019 13:48:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqwHuMwLCUc5ti7IDpbb+lJhunT3CGZwabLxr/KIAgMaClMydWYz/pBFIzHE51uLUQ4i3BNs X-Received: by 2002:a17:902:7205:: with SMTP id ba5mr8151272plb.285.1557434896327; Thu, 09 May 2019 13:48:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557434896; cv=none; d=google.com; s=arc-20160816; b=W+dmObfwbI23CD2nZAz4LUtvLHBuPRn7aeSMR+hoPvcPYaGWxU/g4pD07BfxC5+oZ8 0gR1d7DcGaYnpIjKGCGs7UPpIPi+9pFApAZoK4OyXe7jrmnUmU7TneyIs9anpGYyhNVq I8yktSMl9CQ+aNbIMFCGDu4GpelA3CKiZvdR7LeS86UtY5AY9FDwajmsl9pWCbWcSro8 FePQL0QAtnWZYRNtWHTN/Zt9JNWHbtSzraOM6PEbk8FqRLfwv9pkvKQ51viMeV3XhDlf eTviyD68HvStv0hjht46OCoJy8/6uFSJvJkTViFB/zwdA8tm2KwuWEQ/NWFbFaT2tDM/ 87xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=KeW+/cgRbtlTK4i/VoMv2L+xH+KBUvtMHuDqey4UJBI=; b=T9Qk9psRN8MqZ+sSsPxpkHoYxASmUAJyw2M9Jln7FlN1D7PN+qdZWCbKWRgzXhBaiv 3RYRRXVDv5+3PRVti0hv151+DkJVkeJQalXnG/slYba/tALaev7OxrhEF6/5IPxtydjF /DAKi7nyB6K9r3LH9SWsq6mJveWH4Cs4t8y1hH6oasM1nz/OBmIj/nACLQCYERINeF+X ONoED10BQ1OXHzo2PnO/CVqJxttwDwIzj0ONh7yYbWonNAr612U3TXKxDtWwQrOqK2Us jMZ5RI4HUSqlsvbLq2JplrzBghZ6wHiYCB98JvVO0c85LsNcgFQoEtxVzlwA25O4u3Rk sHxg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t10si4623448pgv.533.2019.05.09.13.48.00; Thu, 09 May 2019 13:48:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726924AbfEIUqt (ORCPT + 99 others); Thu, 9 May 2019 16:46:49 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:40736 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726682AbfEIUqt (ORCPT ); Thu, 9 May 2019 16:46:49 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::3d8]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id C315014DAD6D4; Thu, 9 May 2019 13:46:48 -0700 (PDT) Date: Thu, 09 May 2019 13:46:46 -0700 (PDT) Message-Id: <20190509.134646.706587781958620517.davem@davemloft.net> To: yuehaibing@huawei.com Cc: willemb@google.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, edumazet@google.com, maximmi@mellanox.com Subject: Re: [PATCH v2] packet: Fix error path in packet_init From: David Miller In-Reply-To: <20190509145220.37432-1-yuehaibing@huawei.com> References: <20190508153241.30776-1-yuehaibing@huawei.com> <20190509145220.37432-1-yuehaibing@huawei.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 09 May 2019 13:46:49 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: YueHaibing Date: Thu, 9 May 2019 22:52:20 +0800 > kernel BUG at lib/list_debug.c:47! ... > When modprobe af_packet, register_pernet_subsys > fails and does a cleanup, ops->list is set to LIST_POISON1, > but the module init is considered to success, then while rmmod it, > BUG() is triggered in __list_del_entry_valid which is called from > unregister_pernet_subsys. This patch fix error handing path in > packet_init to avoid possilbe issue if some error occur. > > Reported-by: Hulk Robot > Signed-off-by: YueHaibing > --- > v2: rework commit log Applied and queued up for -stable, thank you.