Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1396178ybl; Fri, 24 Jan 2020 23:15:42 -0800 (PST) X-Google-Smtp-Source: APXvYqz0H+ruzfjAqf8VyudY1oyD9Jb3pd5Z2g34XvfF/pWYsbH30AwRAP684Y7L1pjdTd+lngBG X-Received: by 2002:a9d:4789:: with SMTP id b9mr5560194otf.277.1579936542290; Fri, 24 Jan 2020 23:15:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579936542; cv=none; d=google.com; s=arc-20160816; b=DG4B/lkhssftmszT9mk0HaIA5PXY0c7qJCBxiwo5zs9v9/2/RRggWBu40EIQtKFgfb pNnQOUfY2LAR9/D3P4P1PSI1EsUKAax+uLEgJ1cFXkd1c3E/sOXtoZ/GURcPhSzbb3bp P2n6sjauXdwXXCZAQM3/WOGcTZP0JBauo2sQekp2Z8lv9b5Mc6iu40hdoYumn0vADJ1j bSYkpEWrfN8MqVzQaJU3AtzhxQlB3K75z6sdprKlz/MGcxfuuDTeaB2lGm2besgw8qoY 4/fhMF0aA+Pk2jDYOypihPgS3QyEzqhk1o6oYLw/u9qyeaSQ7rFMR2eDKSFogD2EkXI4 p51Q== 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=AbfBY0Gd4dsOTKmru85psO91r0zV/wprLyxv2Ur3IbI=; b=CzFjArttt7gf1x62ELPo4LAtaWOGbarhXa8AGc83QI/cjor74slZc2bmnY/p60llyB Leu8mczf/XB7GHMtnLja2YR4HD44bmaqqlmy38IflYSZAzTOl+zLzllSPA7QV+Ou/CZy KtlBvg3TXkbszK7W88wF1dtJMRzZQ1jFs6nJBwAa7EOyEQRV5BsGDi6Mrn+8Zf9UfzyA PrmnkNByOCZGXq8EyGANyu7rXpMQgLAOthQgMZFYVvF53DK+1Nwq1kUEPeTf8H11VjQa GFUIkVib9L7CtZhI641aU0UJOFrSGoq4SgT7qTN42hIGG3pV19kqI6Buw7vONiVju81p gw/g== 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 y186si886594oig.241.2020.01.24.23.15.30; Fri, 24 Jan 2020 23:15:42 -0800 (PST) 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 S1728236AbgAYHLY (ORCPT + 99 others); Sat, 25 Jan 2020 02:11:24 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:48330 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725781AbgAYHLY (ORCPT ); Sat, 25 Jan 2020 02:11:24 -0500 Received: from localhost (unknown [62.209.224.147]) (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 6705115A16B9C; Fri, 24 Jan 2020 23:11:20 -0800 (PST) Date: Sat, 25 Jan 2020 08:11:07 +0100 (CET) Message-Id: <20200125.081107.914737890991760251.davem@davemloft.net> To: wenwen@cs.uga.edu Cc: 3chas3@gmail.com, linux-atm-general@lists.sourceforge.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] firestream: fix memory leaks From: David Miller In-Reply-To: <20200125051134.11557-1-wenwen@cs.uga.edu> References: <20200125051134.11557-1-wenwen@cs.uga.edu> X-Mailer: Mew version 6.8 on Emacs 26.3 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]); Fri, 24 Jan 2020 23:11:21 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wenwen Wang Date: Sat, 25 Jan 2020 05:11:34 +0000 > @@ -922,6 +923,7 @@ static int fs_open(struct atm_vcc *atm_vcc) > if (((DO_DIRECTION(rxtp) && dev->atm_vccs[vcc->channo])) || > ( DO_DIRECTION(txtp) && test_bit (vcc->channo, dev->tx_inuse))) { > printk ("Channel is in use for FS155.\n"); > + kfree(vcc); > return -EBUSY; > } > } > -- There is another case just below this line: tc, sizeof (struct fs_transmit_config)); if (!tc) { fs_dprintk (FS_DEBUG_OPEN, "fs: can't alloc transmit_config.\n"); return -ENOMEM; } Please audit the entire function and make sure your patch fixes all of these missing vcc free cases. Thank you.