Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1135087rwb; Wed, 16 Nov 2022 12:36:55 -0800 (PST) X-Google-Smtp-Source: AA0mqf7IorwYCTd8ci7mvKxPAjHnIb5yACZc407A2BRbU1QOtrZk3AGICxtRpAt1UUsInJfS3hFE X-Received: by 2002:a17:902:b204:b0:186:a2e3:7035 with SMTP id t4-20020a170902b20400b00186a2e37035mr10555722plr.74.1668631014951; Wed, 16 Nov 2022 12:36:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668631014; cv=none; d=google.com; s=arc-20160816; b=R/9zEJHx4Wy2zTITEnIviImpy5qPtpDRDTRVQbvyahIOz8vlhkWI7GoaOaj0k781Ul MsZZl++UNcXcu59KIAJApsvEdAfkpfs23Jgp1gcF0PMiqdackAC9mbmYWoOvIi6JWpXO XueNI7qR8IhYSoWLQFF1Nxzp24bkou6GIWSYkWPTFWOBOXodBcgjng2ExDe4Za5Spy02 Paz0sIu8uG6umE1s9jAg96tD6Sj0eiB1FEl3kUYU8vTaz84tFceP+OH0oejwmLdsqnSZ BL8bcyAhS2iG2Nv7Wv3xfdyM4vdPTt/mRs2Y6UpclvcLD6lJ5GHy3X5DVQtcsbDoiWYa cdaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=mLWpfimgRB1mNUBG3QdCO1i/OaAJtbjpK/GGGHx+94Q=; b=ELGCDhuQx8x2BwCEirv/vlD2aClTyF0FVXOkEpR9NQJpwmttGhapBqeaJgb/SQ+Oex fzm9Fr8OHsdKKUibPnTzTsh90HWL0WRrHu88lTaukNMISH2/peMpoqtF9WzpasZjW1Ak mg4jcRyqFbRRDSNXKlZFkC8StVCeABNcSgPOmmLpq9j7DuD1PYYefVLL6G1wiAebv9/Q qPlx+iJBuHiQe+9hbBU0zGQrACvWIRVQvfnMzEZSBz9q8GIPKgqnlCzsI2+N5KLFJRwT awMn3xuU9UxTcXuj0U3R6iAE2zxLS7LKVemRnZf+vjpSa4P7U3lqkKqjqPQyXF/8bqhL 04HQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bc22-20020a656d96000000b0047701a23907si119437pgb.252.2022.11.16.12.36.43; Wed, 16 Nov 2022 12:36:54 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233067AbiKPUPb (ORCPT + 90 others); Wed, 16 Nov 2022 15:15:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231448AbiKPUP3 (ORCPT ); Wed, 16 Nov 2022 15:15:29 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81BAC1F2EA for ; Wed, 16 Nov 2022 12:15:27 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1DC0061F89 for ; Wed, 16 Nov 2022 20:15:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ABB46C433C1; Wed, 16 Nov 2022 20:15:25 +0000 (UTC) Date: Wed, 16 Nov 2022 15:16:10 -0500 From: Steven Rostedt To: "Joel Fernandes (Google)" Cc: linux-kernel@vger.kernel.org, ribalda@google.com, zwisler@google.com, robdclark@gmail.com, Eric Biederman , kexec@lists.infradead.org Subject: Re: [PATCH RFC] kexec: Freeze processes before kexec Message-ID: <20221116151610.7294a9e8@gandalf.local.home> In-Reply-To: <20221116195624.124092-1-joel@joelfernandes.org> References: <20221116195624.124092-1-joel@joelfernandes.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,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, 16 Nov 2022 19:56:24 +0000 "Joel Fernandes (Google)" wrote: > --- a/kernel/kexec_core.c > +++ b/kernel/kexec_core.c > @@ -1175,6 +1175,12 @@ int kernel_kexec(void) > } else > #endif > { > + error = freeze_processes(); > + if (error) { > + error = -EBUSY; > + goto Unlock; > + } If this is the path of a kernel panic, do we really want to check the return error of freeze_processes()? We are panicing, there's not much more we can do. -- Steve > + > kexec_in_progress = true; > kernel_restart_prepare("kexec reboot"); > migrate_to_reboot_cpu();