Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3634370imu; Tue, 18 Dec 2018 01:25:21 -0800 (PST) X-Google-Smtp-Source: AFSGD/VF4lQD9vcM2KMONYwo2f5bY0s3MmZbvmCGXJCHJG9Yd6TI+qLEVaqWbpCTCpzSiFcj+cGj X-Received: by 2002:a62:d448:: with SMTP id u8mr15908345pfl.105.1545125121815; Tue, 18 Dec 2018 01:25:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545125121; cv=none; d=google.com; s=arc-20160816; b=uizZagL18pClm3+oi2njv7JUxy7onC0Y70R8Qm9cWo3+sSlcFDqn1RHVg8+Ol+gZ9p X78ROA0NAvqWpauGpp0JIAydoKgoZoyrCMaxz+iGNKDglbHhXwDky7FDYAJsb2hx9/Wf mqaIYxafdJjJ48PpqHw2LQkxdGE4pfuUVMjzOqwsj/ET3LbbQ3A+0ULqNxsjYQsBSFux kGAIVOx9NzPnAff7dylq+P46Hf4UqtbyFQ99DhJiWDZKVTv87/RyK40M40z1eoWjHNc3 RSRZOTJbsK24QgV892Dda0xIz753jGEFD5X80TtOGvEuKnDv57lN0QEdGP4pdrtDifDO VZSQ== 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; bh=0QDt48S2092Vhy7h8lIN2WO0JjHcwXwDYjGBLvOSTa8=; b=yeSOtV62jeG0Paj3wVZ617+qTTXTNP1PsSKvvbtexrHoyHmLWOHVNAt4hIp5ksE881 2pgaialMmamHfgoUWuTjshoXIVaZB1v4UfFfrLeNBaIG/N/Ai9APwUx1i4hqsdDLA59b DIWekxzTrON4MqDfVnKNTEpJJlylAdGsqyZxQ9xOH2BkesWFNrVDsQE3k0K0hnJ4Cjqe CgSa3HJcKwzZ1WAIOkYkhlDkF5sZc1nDvBzvFXpssYDIZwRGz76DmTfAXgkcLIQ9bZId h5i5HHJPogloUM0Fw9K4gNwnV8/yYr64YWk+fud0JXQhARVluL+P3vROD3oDdSxE869I 5MPA== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e4si12709516pgl.570.2018.12.18.01.25.06; Tue, 18 Dec 2018 01:25:21 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726446AbeLRJX4 (ORCPT + 99 others); Tue, 18 Dec 2018 04:23:56 -0500 Received: from mx2.suse.de ([195.135.220.15]:52090 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726386AbeLRJXz (ORCPT ); Tue, 18 Dec 2018 04:23:55 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id EE1AAAC3C; Tue, 18 Dec 2018 09:23:53 +0000 (UTC) Date: Tue, 18 Dec 2018 10:23:53 +0100 (CET) From: Jiri Kosina To: Nicholas Mc Guire cc: Josh Poimboeuf , Jessica Yu , Miroslav Benes , Petr Mladek , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] livepatch: check kzalloc return values In-Reply-To: <1544806570-21299-2-git-send-email-hofrat@osadl.org> Message-ID: References: <1544806570-21299-1-git-send-email-hofrat@osadl.org> <1544806570-21299-2-git-send-email-hofrat@osadl.org> User-Agent: Alpine 2.21 (LSU 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 Fri, 14 Dec 2018, Nicholas Mc Guire wrote: > kzalloc() return should always be checked - notably in example code > where this may be seen as reference. On failure of allocation in > livepatch_fix1_dummy_alloc() respectively dummy_alloc() previous > allocation is freed (thanks to Petr Mladek for > catching this) and NULL returned. > > Signed-off-by: Nicholas Mc Guire > Fixes: 439e7271dc2b ("livepatch: introduce shadow variable API") Applied to for-4.21/upstream, thanks. -- Jiri Kosina SUSE Labs