Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp908201rwi; Mon, 31 Oct 2022 08:57:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM76DV+QNFC/R8QHIYLeWXssVQHBJrCu72rKaxgUuU9jkpA7d6/li+ZC+nk36Zl2KaHFogHT X-Received: by 2002:a17:907:2e0d:b0:78e:1d21:8001 with SMTP id ig13-20020a1709072e0d00b0078e1d218001mr13396967ejc.246.1667231862238; Mon, 31 Oct 2022 08:57:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667231862; cv=none; d=google.com; s=arc-20160816; b=rzr+zSSoGzgrOyPK/AJKLBV9i25YjTlmgAkdAN/MTKEaHLXzFv4ob7C5uyem5nqKg7 vsf9vbST9eK5rwNmWKfLN8jtccgoku9Bk+SF2DBZW8Xaje5uf+by3gndINQWVVRgNlcZ IRJ0pRHRY/7WPncIrTDMfG3YVg02Iv3y4Mc7YxyofTuQk/b3El3dH7Icx8asvqDy27xJ dzyavm+wjKk7ZR4gBw7IqzsHA23lq/BCl/x/E17Ky5LoDh8VxSAMNlCA+R1Yp+vGkJOz OTvVpMKqnQel8C4fDaWIbDHtUMqr/CZkf4/DWUL2JzJZz7emZ48/iKVzhprcCHMuV00C CrxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=i4Zj+h04eVlfP46QU5vTbodNu6q3W8ewMemZyhjhMOU=; b=bznnrW88pddPyliwDUlngHFhTkHtDaqR3pUJs+WIma7RIGug5Ol57q+GWaKQagwfU/ NSvYTTwZ3lYK5awMvNNCwdAX1Vy6j6apAQH61jOIlGZg7O1rClVACbUvTn/c+X+zhmwR PH1wz95+0hzXNAPNthTTeiXaPUXCXIFfOKcXBwC4pl5ppWkgis0/Zrtfy5VMXF8kEXFd 3nHSjMu2+g6GTtI0cLv/C2AXXXCiyUtxGY3hH14MgYN5K6WbB1F+vXRzNMXw8rIKw9Gb cyzErh7HVxrpIRm8640MnURu+ePGnaNfoVsEMDn8FBQm5p1c3yvkNjF2JK+0fuZYP3jJ EsXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=JVz+ccZ3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gn17-20020a1709070d1100b0078d38cda44bsi10067733ejc.694.2022.10.31.08.57.18; Mon, 31 Oct 2022 08:57:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=JVz+ccZ3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232107AbiJaPqC (ORCPT + 98 others); Mon, 31 Oct 2022 11:46:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232053AbiJaPpj (ORCPT ); Mon, 31 Oct 2022 11:45:39 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59ADB12A86; Mon, 31 Oct 2022 08:44:52 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 10DFC338D0; Mon, 31 Oct 2022 15:44:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1667231091; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=i4Zj+h04eVlfP46QU5vTbodNu6q3W8ewMemZyhjhMOU=; b=JVz+ccZ3uUe8BmOeu0DTtJw8zaRAEqp6azs2ERt8mYicgfeBVM5qA6sPY/6USr6PWVQE9x jcbPlx7zZOWcDyeuKpfm1QPK50p6uGIY8rw2lk+GZv9lqOoiaOt+Kz8WQR9giTQD6haSmq Gr3Du5UUMECLqvBNEULmhlUbHoajGKA= Received: from suse.cz (unknown [10.100.201.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id D77602C141; Mon, 31 Oct 2022 15:44:50 +0000 (UTC) Date: Mon, 31 Oct 2022 16:44:49 +0100 From: Petr Mladek To: Marcos Paulo de Souza Cc: linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, jpoimboe@redhat.com, joe.lawrence@redhat.com Subject: Re: [PATCH v2 1/4] livepatch/shadow: Separate code to get or use pre-allocated shadow variable Message-ID: References: <20221026194122.11761-1-mpdesouza@suse.com> <20221026194122.11761-2-mpdesouza@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221026194122.11761-2-mpdesouza@suse.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 2022-10-26 16:41:19, Marcos Paulo de Souza wrote: > From: Petr Mladek > > Separate code that is used in klp_shadow_get_or_alloc() under klp_mutex. > It splits a long spaghetti function into two. Also it unifies the error > handling. The old used a mix of duplicated code, direct returns, > and goto. The new code has only one unlock, free, and return calls. > > It is code refactoring without any functional changes. > > Signed-off-by: Petr Mladek > Signed-off-by: Marcos Paulo de Souza Reviewed-by: Petr Mladek Best Regards, Petr