Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5539482ybv; Tue, 11 Feb 2020 18:09:08 -0800 (PST) X-Google-Smtp-Source: APXvYqzJIX02+Z+aA7HT1gObyaydkXR9n5gsQkrNIRH4zMCUL08lukzL2rVG88z1qAXwg1S/fCnw X-Received: by 2002:aca:e106:: with SMTP id y6mr4853612oig.131.1581473348081; Tue, 11 Feb 2020 18:09:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581473348; cv=none; d=google.com; s=arc-20160816; b=BwJbH7iL6tPCM3IiRAcx32vv1U+cRwRJdCklDQ4Xf3F+HuhW4HxVoS6YMT29H8ATtn ZEEigQXbmOUlaxgkiLdz5vhUsnLHu8G3SzUjjEwLHS96F7drAtx2ztw9hMr2w8II53pU +D/DZtRXm7xZtFlX8SMig4d34Twq/k8mrCc+pY7BHfL5ivspQI4g+zg7bC1EweXRJHQJ ZFA9004F4s3iW6ZbG2Hp4QwKwFevC2K+bjy3cmCFOIsb9In0LDM5+lPHsbXTHJKkalvm E45l7yZxCAlKpM+NciPDpnfV9Ha1lvf6ZjBm2udubgiLFc7H0wC5Po2ZC3j3Uv6BF8CY qS4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=XfXQzEXK/40yroZE0WNrO0xGbb0dPANvOZRe3DecyDs=; b=CGe0LkDuAGJCa7sgHEc4cZWLTf11GY+/dxnM844lTGKj73PqbHwGSpRTrPw5SXpdj+ dMzG7vzYfl1Z6miJba/ajPutBO/6squh/V/WW4re1EZOptSXOSmXmeOwuEp9jhwg/z0J 5AgjaxsqHhFc0KE4fR85pxbmRvm4D+ZDW9Ipr4I3k+D98PLwhBcTGMwyvfhNSO0s62Ki aML6dPpbM60ITua1G9QRevK07pvxWfa8iNoAPWIkVsMf4TBB9BMquHPoU/hT8n2wNCyS 8mIhDLDUdnnvpUBn0TFH+KkpMlqmRuhg+BPPcHA6AmtW6LdPO6StoLXkbaZ16o609+IA GIpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=DlkEkNZ1; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t10si2889709otp.310.2020.02.11.18.08.56; Tue, 11 Feb 2020 18:09:08 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=DlkEkNZ1; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727579AbgBLCHq (ORCPT + 99 others); Tue, 11 Feb 2020 21:07:46 -0500 Received: from mail-pj1-f65.google.com ([209.85.216.65]:34713 "EHLO mail-pj1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727007AbgBLCHq (ORCPT ); Tue, 11 Feb 2020 21:07:46 -0500 Received: by mail-pj1-f65.google.com with SMTP id f2so1339202pjq.1 for ; Tue, 11 Feb 2020 18:07:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=XfXQzEXK/40yroZE0WNrO0xGbb0dPANvOZRe3DecyDs=; b=DlkEkNZ143FuGHyJDBiGhBWZGuw9BmGtJntu88b+qG8Wy/4BGIua6grAgl58/D8q6V bg7bGuCteUJx6urWsoOGAVo8c1MrA8b2pG0/fcuQZuo/3JcTIEE73K3fmyLn9yhxKkg6 42oRI5iUl1mzf+2uM4Z/Kbi3ux+CdnOIq1fdN+fJgmqBIRaqnAxrYUbvA6L/8YYfg+K1 GZGPxRlOp1AwC5NLUD2OqYoLBZ1lkZRZZ40WllIKQx35iFIQ7gA0r61pUpyy/AFxnlDf 1SQZsQx08pN3u0xznbDlXl8+RMULAZJIwxsLzICZgrishQjVpLvTVG7QnsfY6ASYMJ52 lblA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=XfXQzEXK/40yroZE0WNrO0xGbb0dPANvOZRe3DecyDs=; b=HNV+UoD4PO5OhIiF1RIKFs1X/nG9FGFpl76hadiqmP0jhrkHFX25GPcE/QYOsOG1H2 Fjp+pXLzgsncyRljrVPawYClC9QlXClWSyGBDfriXdm5u2DPw7WKmHzNdqRAxM2VWoZy Nc3FljwuTYege6miqae9eJubHzDs8uY0rsaGxdkFFQMzc80MPqfu6VNRB94CLKbgtETz G1HW0QKHCkszlcCDqU8S1OAgq+q+E8vJvWURsZ4wiKcaOdDJsWBJN56j5t1no8rI0T3C XET3mPe7vQ1egH2stGkcfGw1ZaeERW6+cCRagMRmlgmgcsPLpjT8DHQdVhYrF9UTv1Z3 NCBw== X-Gm-Message-State: APjAAAUGQmoWXIgLBuHZRNMknJ7L+5BdHqG9+enHOS9DSUy14vWpcq6N 4B8MSHcURpfuV1oovLTHoIoKVg== X-Received: by 2002:a17:90a:a416:: with SMTP id y22mr7227341pjp.114.1581473264298; Tue, 11 Feb 2020 18:07:44 -0800 (PST) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id q28sm5933860pfl.153.2020.02.11.18.07.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 18:07:43 -0800 (PST) Date: Tue, 11 Feb 2020 18:07:43 -0800 (PST) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Yang Shi cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] mm: vmpressure: don't need call kfree if kstrndup fails In-Reply-To: <1581398649-125989-1-git-send-email-yang.shi@linux.alibaba.com> Message-ID: References: <1581398649-125989-1-git-send-email-yang.shi@linux.alibaba.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 11 Feb 2020, Yang Shi wrote: > When kstrndup fails (returns NULL) there is no memory is allocated by > kmalloc, so no need to call kfree(). > > Signed-off-by: Yang Shi Acked-by: David Rientjes