Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp99996ybl; Thu, 15 Aug 2019 13:27:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqzydyN/JmwLUbfNjF53XOSlmenGueHk0C7KVtOPhHLSfVKZCpja5siih93R9Lc/+yAnQLr3 X-Received: by 2002:a17:90a:fe0c:: with SMTP id ck12mr3932427pjb.74.1565900868525; Thu, 15 Aug 2019 13:27:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565900868; cv=none; d=google.com; s=arc-20160816; b=v1/KJj0tuhClg7/ig3FV2PO77HvRFl9khCDOiD9bnv/v56hjVlYgoaoBftL3maGz5E PpzQsMi09L2PKY3ucCuSqw7mn39+Gcsyz5KhQyLxri2507tmE1e8RYvrBEEclIyOIZ+m Kt4Tb/EUbpLslgqW8dYuRd9ztA+npPpTaQrKkgP7bB7WHDuH7D34R2SIezRROucWQeAV /ZEDY3FZdaGQrq4JC5MCSSKk7WeDn+B0tBnQbAs6AcF7DEBxFjUFtXEX/XJj8UmnrqTp hnFYF5GBIIeEH43pzEbxXdUshcira5x3h+qla7s6wBnjcotAp9oeL+LMcZSIKIU9Zu6j mSYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=VfYfA161CvRsrkQTVnNdoGfW9ngwW3G7phpYyGzMz90=; b=Lgh/5yDdxcw8/HS1jkJnJZyx225M6/k5lCMiWkGqBw3nrfCKYHl52hpNiXG0vmPEE5 CFu1j0ueoTiTp5MTfd2nJn7wVYeEPPRMi0TddBd+9ywbZWrfOBqIRJ9VLOmjH3QIlZC7 od4Fe0YcLMFa3nvV4ESEP3omPv1KTHFDtr0glQ/Fius6QkAzeWpT0V4jx10iPEx9k0GK naKhlIcNiTrXnp/fL5oUpdbKttK1d3S6RnjCPOb2Dw23ownce21XJovHHj2X9Soysus3 YayTRNlwX76u9rNW527fkVrjJpHp6d21QlA7QIsBCv+dlmeKiDsXv1oLgn8PhccU0FnS ZuoQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w4si2575511plq.1.2019.08.15.13.27.31; Thu, 15 Aug 2019 13:27:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733158AbfHOTpX (ORCPT + 99 others); Thu, 15 Aug 2019 15:45:23 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:49240 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729843AbfHOTpW (ORCPT ); Thu, 15 Aug 2019 15:45:22 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::d71]) (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 35C7614013D5B; Thu, 15 Aug 2019 12:45:22 -0700 (PDT) Date: Thu, 15 Aug 2019 12:45:21 -0700 (PDT) Message-Id: <20190815.124521.638274291598387510.davem@davemloft.net> To: wenwen@cs.uga.edu Cc: christopher.lee@cspi.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: myri10ge: fix memory leaks From: David Miller In-Reply-To: <1565764719-6488-1-git-send-email-wenwen@cs.uga.edu> References: <1565764719-6488-1-git-send-email-wenwen@cs.uga.edu> 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, 15 Aug 2019 12:45:22 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wenwen Wang Date: Wed, 14 Aug 2019 01:38:39 -0500 > In myri10ge_probe(), myri10ge_alloc_slices() is invoked to allocate slices > related structures. Later on, myri10ge_request_irq() is used to get an irq. > However, if this process fails, the allocated slices related structures are > not deallocated, leading to memory leaks. To fix this issue, revise the > target label of the goto statement to 'abort_with_slices'. > > Signed-off-by: Wenwen Wang Applied, thanks.