Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2689292ybl; Mon, 19 Aug 2019 06:09:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqzsEyKqCWFF6xLB7jeT/3yBZrUHSxNkk/vOB4kziT62CK+nFkzsGH0fiKzZYW9ejr3UvZ2g X-Received: by 2002:a62:db86:: with SMTP id f128mr23472733pfg.159.1566220150944; Mon, 19 Aug 2019 06:09:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566220150; cv=none; d=google.com; s=arc-20160816; b=GC8j/QyvDJ/LLbReQezHbH0S0v47hYhfsQQpjeP5uyLDe+Vhv64FgsKMOWa6boWYl/ b42B5Kr2fckhaMloD6aiQ3vLjmX6WxwGBWcfExWm27Rn0LWgfwzsbmMtelqQMBYtoBPj PEjB5VLgJBZIcOaVlX3mjgSVDaUzo+Q6FG4251ToBkWWUq/aaur142bGb3+SfD4wLhuv qzSaBYMaj/n51dJXIGJIqzChjdaEzFdUetrrmM7CUMxPo6TBrAL1rG2c8v9FubcRwBZy cIZWjzOw7CGjblxIUGjdG5oixTIGYI2jiXbI8snydTwK5nbIIJBr/LqGh9yRhrgNUCBv Um0w== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=MSlUUTcz2GMXUcAlt8+APpe/GYuqoWKWKfGMgGnBANc=; b=Qg7XTuPbrQKQfgG2rEfFkZgnEMuCr5ypFdgchOGkwQX10GP6xHrtzzDeUXTJ3UFvKW FSiqjoX/H0n7yvB580xx3lW2T9QIQvNof+Oh4bmilbyZ5+1f4OdJPn3SRsGNcGekfiHI 7kLLpo2AafTu9OAR7tcYLyk1eM7YZJfT7VHTjySvWGDQSza19V5zn7/PJrC1IxyZSO7s jIsx4a5Xj7UQkDuwghwUHQn1OomAAwIQLzoSgsJiYcHS8WuMiJI/oRkF/ysEUAVDb7+p 2EP2QO5xNI3LTuRoBPioXufUuh6u6odgbWgKGr81StriFVfsnCnrANFts9oqzuQ/TIub hz4w== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l70si9690806pgd.363.2019.08.19.06.08.54; Mon, 19 Aug 2019 06:09:10 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727669AbfHSNHl (ORCPT + 99 others); Mon, 19 Aug 2019 09:07:41 -0400 Received: from mga04.intel.com ([192.55.52.120]:56483 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726987AbfHSNHl (ORCPT ); Mon, 19 Aug 2019 09:07:41 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Aug 2019 06:07:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,403,1559545200"; d="scan'208";a="168744924" Received: from ddalessa-mobl.amr.corp.intel.com (HELO [10.254.207.195]) ([10.254.207.195]) by orsmga007.jf.intel.com with ESMTP; 19 Aug 2019 06:07:38 -0700 Subject: Re: [PATCH] infiniband: hfi1: fix a memory leak bug To: Wenwen Wang Cc: Mike Marciniszyn , Doug Ledford , Jason Gunthorpe , "open list:HFI1 DRIVER" , open list References: <1566156571-4335-1-git-send-email-wenwen@cs.uga.edu> From: Dennis Dalessandro Message-ID: <463bb1cb-d132-2f5f-6e94-e0115228c3cb@intel.com> Date: Mon, 19 Aug 2019 09:07:38 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <1566156571-4335-1-git-send-email-wenwen@cs.uga.edu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/18/2019 3:29 PM, Wenwen Wang wrote: > In fault_opcodes_read(), 'data' is not deallocated if debugfs_file_get() > fails, leading to a memory leak. To fix this bug, introduce the 'free_data' > label to free 'data' before returning the error. > > Signed-off-by: Wenwen Wang Acked-by: Dennis Dalessandro