From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Pirko Subject: Re: [PATCH net] devlink: double free in devlink_resource_fill() Date: Sun, 23 Sep 2018 19:20:24 +0200 Message-ID: <20180923172024.GC2203@nanopsycho> References: <20180921080755.GA16307@mwanda> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jiri Pirko , "David S. Miller" , netdev@vger.kernel.org, kernel-janitors@vger.kernel.org To: Dan Carpenter Return-path: Received: from mail-wm1-f66.google.com ([209.85.128.66]:39099 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726302AbeIWXXR (ORCPT ); Sun, 23 Sep 2018 19:23:17 -0400 Received: by mail-wm1-f66.google.com with SMTP id q8-v6so7812667wmq.4 for ; Sun, 23 Sep 2018 10:25:05 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20180921080755.GA16307@mwanda> Sender: netdev-owner@vger.kernel.org List-ID: Fri, Sep 21, 2018 at 10:07:55AM CEST, dan.carpenter@oracle.com wrote: >Smatch reports that devlink_dpipe_send_and_alloc_skb() frees the skb >on error so this is a double free. We fixed a bunch of these bugs in >commit 7fe4d6dcbcb4 ("devlink: Remove redundant free on error path") but >we accidentally overlooked this one. > >Fixes: d9f9b9a4d05f ("devlink: Add support for resource abstraction") >Signed-off-by: Dan Carpenter Acked-by: Jiri Pirko