From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Pirko Subject: Re: [Patch net-next] net_sched: check NULL in tcf_block_put() Date: Fri, 3 Nov 2017 07:56:19 +0100 Message-ID: <20171103065619.GD2024@nanopsycho> References: <20171103003208.12329-1-xiyou.wangcong@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, dave.taht@gmail.com, Jiri Pirko To: Cong Wang Return-path: Received: from mail-wr0-f180.google.com ([209.85.128.180]:54859 "EHLO mail-wr0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750805AbdKCG4V (ORCPT ); Fri, 3 Nov 2017 02:56:21 -0400 Received: by mail-wr0-f180.google.com with SMTP id o44so1598508wrf.11 for ; Thu, 02 Nov 2017 23:56:20 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20171103003208.12329-1-xiyou.wangcong@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: Fri, Nov 03, 2017 at 01:32:08AM CET, xiyou.wangcong@gmail.com wrote: >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 Reviewed-by: Jiri Pirko