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=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 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 E107BC2BBC7 for ; Thu, 9 Apr 2020 14:33:26 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9F86A215A4 for ; Thu, 9 Apr 2020 14:33:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9F86A215A4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jMYF0-00054o-P1; Thu, 09 Apr 2020 14:33:14 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jMYEz-00054b-NA for xen-devel@lists.xenproject.org; Thu, 09 Apr 2020 14:33:13 +0000 X-Inumbo-ID: 06cd4584-7a6f-11ea-b58d-bc764e2007e4 Received: from hera.aquilenet.fr (unknown [2a0c:e300::1]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 06cd4584-7a6f-11ea-b58d-bc764e2007e4; Thu, 09 Apr 2020 14:33:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id B0F682FEF; Thu, 9 Apr 2020 16:33:05 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IMM8uDMPC8o7; Thu, 9 Apr 2020 16:33:04 +0200 (CEST) Received: from function.home (unknown [IPv6:2a01:cb19:956:1b00:9eb6:d0ff:fe88:c3c7]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 473002FBC; Thu, 9 Apr 2020 16:33:04 +0200 (CEST) Received: from samy by function.home with local (Exim 4.93) (envelope-from ) id 1jMYEo-001zWn-L7; Thu, 09 Apr 2020 16:33:02 +0200 Date: Thu, 9 Apr 2020 16:33:02 +0200 From: Samuel Thibault To: Juergen Gross Subject: Re: [PATCH 1/3] mini-os: fix double free() in netfront Message-ID: <20200409143302.4kcbb3rf7rfxqkhq@function> Mail-Followup-To: Samuel Thibault , Juergen Gross , minios-devel@lists.xenproject.org, xen-devel@lists.xenproject.org, wl@xen.org References: <20200409141240.28876-1-jgross@suse.com> <20200409141240.28876-2-jgross@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200409141240.28876-2-jgross@suse.com> Organization: I am not organized User-Agent: NeoMutt/20170609 (1.8.3) X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: minios-devel@lists.xenproject.org, xen-devel@lists.xenproject.org, wl@xen.org Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Juergen Gross, le jeu. 09 avril 2020 16:12:38 +0200, a ecrit: > Commit d225f4012d69a19 ("Save/Restore Support: Add suspend/restore > support for netfront") introduced a regression in form of freeing a > netfront device structure twice. > > Fix that. > > Coverity-ID: 1433637 > Fixes: d225f4012d69a19 ("Save/Restore Support: Add suspend/restore support for netfront") > Signed-off-by: Juergen Gross Reviewed-by: Samuel Thibault > --- > netfront.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/netfront.c b/netfront.c > index 50b3a57..fe7bb62 100644 > --- a/netfront.c > +++ b/netfront.c > @@ -584,8 +584,6 @@ void shutdown_netfront(struct netfront_dev *dev) > list->refcount--; > if (list->refcount == 0) { > _shutdown_netfront(dev); > - free(dev->nodename); > - free(dev); > > to_del = list; > if (to_del == dev_list) { > -- > 2.16.4 >