From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F16EC43381 for ; Thu, 14 Feb 2019 17:42:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 48F0F222D7 for ; Thu, 14 Feb 2019 17:42:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404234AbfBNRmP (ORCPT ); Thu, 14 Feb 2019 12:42:15 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:57178 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404044AbfBNRmP (ORCPT ); Thu, 14 Feb 2019 12:42:15 -0500 Received: from localhost (96-89-128-221-static.hfc.comcastbusiness.net [96.89.128.221]) (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 7EBD114D644C4; Thu, 14 Feb 2019 09:42:14 -0800 (PST) Date: Thu, 14 Feb 2019 09:42:13 -0800 (PST) Message-Id: <20190214.094213.483495158232464062.davem@davemloft.net> To: jiri@resnulli.us Cc: netdev@vger.kernel.org, mlxsw@mellanox.com Subject: Re: [patch net-next] lib: objagg: fix handling of object with 0 users when assembling hints From: David Miller In-Reply-To: <20190214143907.3275-1-jiri@resnulli.us> References: <20190214143907.3275-1-jiri@resnulli.us> 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, 14 Feb 2019 09:42:14 -0800 (PST) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jiri Pirko Date: Thu, 14 Feb 2019 15:39:07 +0100 > From: Jiri Pirko > > It is possible that there might be an originally parent object with 0 > direct users that is in hints no longer considered as parent. Then the > weight of this object is 0 and current code ignores him. That's why the > total amount of hint objects might be lower than for the original > objagg and WARN_ON is hit. Fix this be considering 0 weight valid. > > Fixes: 9069a3817d82 ("lib: objagg: implement optimization hints assembly and use hints for object creation") > Signed-off-by: Jiri Pirko Applied, thanks Jiri.