Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp231052ybb; Tue, 14 Apr 2020 23:49:06 -0700 (PDT) X-Google-Smtp-Source: APiQypJYDlDbcnIMUq3w26cMrRHF6Oqa4Ol8asVAqf+IxF+VxY9uDa7gs7Ku5nS4Q6kmEjf+Amh+ X-Received: by 2002:a05:6402:1246:: with SMTP id l6mr13623445edw.186.1586933346336; Tue, 14 Apr 2020 23:49:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586933346; cv=none; d=google.com; s=arc-20160816; b=bjNOdAfytkCFzE3zVJf2IN4/NdxXS9qTc9O7PYVZ66M9EsADQvM0LnYnIfut3oj8vf Ff/c5BT5V6nzi7mruQrTf5Ponie4+NhsGJdjXS2HEth8uyQzXOTJaoL9Jg0/VnlVeX1D 6rC92xCl9HRcT4LDICIoUo6KpzjHyw2BxVxHcFAiekkc0mUUUkcoq9lR19TaTRlMMXOJ UqnHNwpv1TL7XF7DDB3mUM5C3xCrb+8Z9b3I5+6iAf+Ekpjo6iRrnU//LUWmgKHhw5GS JRD+k7AKr7PyawqvyLdUIxPQIbqniARvJBiGMPDlVhaXzn1j3U1DKD8BcjGNLAL7O+T6 iYMA== 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:reply-to; bh=bAoR5NmcmThqGwNvik0NTCVEEhRQDmc5Ie6hePkU6ok=; b=pDg8RekCRsvemraTLd+c2vqLJFvu5pVtOoyEdmgX5vcuYdD/RIeKDl94u/A03A5bHE vJEPyWMBgR65OrxF0wpzR9nrpEDCv5ei0DsLPvy59+bUnJFFLHrjxdMpxn16hobVxVTv Dx3WPONXOaTaytjr4VPJoCjitmfrXa+xH5vtzrNeItd1UH0Nc1rgBqk6oLgYFlyq1VHP 4PmO8z+VI5w11gzeluEcVHFe3B8HD4Zy+nq7Jd9/UVePTZzjDBHZo9oH0TuZ2ywrpklX Kn05pTajOHMPuHS5uMMXHkG7rjOvcwb0XS3txN7kAXJOJTHh1T52J8qQWGw2vTH2uA2x LwrQ== 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 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m5si2973193ejr.155.2020.04.14.23.48.42; Tue, 14 Apr 2020 23:49:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403818AbgDNBjU (ORCPT + 99 others); Mon, 13 Apr 2020 21:39:20 -0400 Received: from smtp.infotech.no ([82.134.31.41]:42691 "EHLO smtp.infotech.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728252AbgDNBjT (ORCPT ); Mon, 13 Apr 2020 21:39:19 -0400 Received: from localhost (localhost [127.0.0.1]) by smtp.infotech.no (Postfix) with ESMTP id 7A8D220425A; Tue, 14 Apr 2020 03:39:16 +0200 (CEST) X-Virus-Scanned: by amavisd-new-2.6.6 (20110518) (Debian) at infotech.no Received: from smtp.infotech.no ([127.0.0.1]) by localhost (smtp.infotech.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2ZpwWByjkMTG; Tue, 14 Apr 2020 03:39:15 +0200 (CEST) Received: from [192.168.48.23] (host-23-251-188-50.dyn.295.ca [23.251.188.50]) by smtp.infotech.no (Postfix) with ESMTPA id F28A120414B; Tue, 14 Apr 2020 03:39:13 +0200 (CEST) Reply-To: dgilbert@interlog.com Subject: Re: [PATCH] scsi: sg: fix memory leak in sg_build_indirect To: Markus Elfring , Li Bin , linux-scsi@vger.kernel.org Cc: linux-kernel@vger.kernel.org, "James E. J. Bottomley" , "Martin K. Petersen" , Xie XiuQi References: <8b5551e6-46e2-9def-8ab6-ec5ba252c5ea@web.de> From: Douglas Gilbert Message-ID: <0162f996-eb48-fda5-8355-1c9bc1162177@interlog.com> Date: Mon, 13 Apr 2020 21:39:04 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <8b5551e6-46e2-9def-8ab6-ec5ba252c5ea@web.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-CA Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-04-13 3:35 p.m., Markus Elfring wrote: >> Fix a memory leak when there have failed, that we should free the pages >> under the condition rem_sz > 0. > > I suggest to improve the change description. > > * Please use an imperative wording. nominative, vocative, accusative, genitive ... I have made some comment suggestions in response to the original posts from the author. > * Will the tag “Fixes” become relevant? Yes, both patches from the author are fixes. These leaks would typically appear on a system under resource pressure (specifically low memory) and would tend to make the situation worse. Doug Gilbert