Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2662762imu; Mon, 17 Dec 2018 05:56:56 -0800 (PST) X-Google-Smtp-Source: AFSGD/VX+cOh/gvh6J6ZmUlkfkqQ8z+KXuJ65ABiwC26G/EpZ9mm6cFpqAn5o+AMuwbXgSQBd2jS X-Received: by 2002:a62:d2c1:: with SMTP id c184mr13047603pfg.248.1545055016706; Mon, 17 Dec 2018 05:56:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545055016; cv=none; d=google.com; s=arc-20160816; b=eeG70kzFvF5+9azZILyJjcgRLXhVniknvXp2KGIMAhLUNJnWjh8OjVGa0PnBss3rYi cUu+wLMIMJEgZtD3oLSUzCMzxLRmIt7sbIhV4HdQRdfX7KV45QLpfh8Ltu35h2QstqbK ZXuBCapwVR3LvR6Vd/E7d0OENDpGsl9wriLRlSgvxhMKopxC+EBS1UfC51uEpJD6FXq5 2nZMqKhug6EcBLzZlvZKWJXBQgQsl6qY/m2g9T7nUb6WJ3LQ0I1R0HQY6VVondFx08eW galTjhaEjz52SspOor3dXDxhPBH8bnB9OC56ySpFHmhyyE3qFfPnYVimul00NFcs81wh kZFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=PharXTm/h1wKxbAMRf6STVPn9jGw9P+PPlJDD9AhhNU=; b=MhPrNu5GP6jp9p9owTJt2u46ZEt6xjZ4w7txLRhON5yLJk5y15PN6rXLUHcLOTH0My /inQrR8ldrNYwEYrIiZfnaYViWFcE+n3vZxoVcGEk7/AenEnWNMSDfTLA8wY2sEI35XB uub9axKU177TSHeFDVuNN1kkCU5ubOmttF/yqOr1gvl2XDPWQPMlzNwhFUxwuV8GIutR 5PSEQ1DQhthZ78E3a4NODN7XSfybvYzpKhlv+vkFN20z1LaN/aIiLJrqqxFfUeuMnCb2 hmWzbgi5EZS9iPa57I0xlxnN36aKw+BY7q3m5yJ7rkaoNMz693EC3eVs5SnE1bjboqzG 2ejA== 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 u129si11477644pfu.117.2018.12.17.05.56.41; Mon, 17 Dec 2018 05:56:56 -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 S1732267AbeLQLln (ORCPT + 99 others); Mon, 17 Dec 2018 06:41:43 -0500 Received: from mx2.suse.de ([195.135.220.15]:54418 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727347AbeLQLln (ORCPT ); Mon, 17 Dec 2018 06:41:43 -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 B91D1ACE3; Mon, 17 Dec 2018 11:41:41 +0000 (UTC) Date: Mon, 17 Dec 2018 12:41:41 +0100 From: Petr Mladek To: Nicholas Mc Guire Cc: Josh Poimboeuf , Jessica Yu , Jiri Kosina , Miroslav Benes , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] livepatch: check kzalloc return values Message-ID: <20181217114141.qwq5q6zdaikakihw@pathway.suse.cz> References: <1544806570-21299-1-git-send-email-hofrat@osadl.org> <1544806570-21299-2-git-send-email-hofrat@osadl.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1544806570-21299-2-git-send-email-hofrat@osadl.org> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 2018-12-14 17:56:10, 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") It is a bit confusing that it was not re-send together with v2 of the other patch. It should not get lost! Reviewed-by: Petr Mladek Best Regards, Petr