From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [Patch net-next] net_sched: check NULL in tcf_block_put() Date: Fri, 03 Nov 2017 21:31:32 +0900 (KST) Message-ID: <20171103.213132.1713032886433577331.davem@davemloft.net> References: <20171103003208.12329-1-xiyou.wangcong@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, dave.taht@gmail.com, jiri@mellanox.com To: xiyou.wangcong@gmail.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:41892 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751814AbdKCMbi (ORCPT ); Fri, 3 Nov 2017 08:31:38 -0400 In-Reply-To: <20171103003208.12329-1-xiyou.wangcong@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Cong Wang Date: Thu, 2 Nov 2017 17:32:08 -0700 > Callers of tcf_block_put() could pass NULL so > we can't use block->q before checking if block is > NULL or not. > > tcf_block_put_ext() callers are fine, it is always > non-NULL. > > Fixes: 8c4083b30e56 ("net: sched: add block bind/unbind notif. and extended block_get/put") > Reported-by: Dave Taht > Cc: Jiri Pirko > Signed-off-by: Cong Wang Applied, thanks Cong.