Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1174998rwb; Wed, 16 Nov 2022 13:17:32 -0800 (PST) X-Google-Smtp-Source: AA0mqf4RcAJ1RnmCfUXRx7b9MUsVvK33ybpn5p0FjssVZulWoyi0SJlybJhUSawVJxa9XWu0ymcR X-Received: by 2002:a17:907:2957:b0:7ae:1826:b27b with SMTP id et23-20020a170907295700b007ae1826b27bmr17923021ejc.692.1668633452069; Wed, 16 Nov 2022 13:17:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668633452; cv=none; d=google.com; s=arc-20160816; b=BX+Tnw1h3/cfGMMaqD/C8yCh1j8K0OPsGElJoAAWIZP6gbuVvSya66MULOvJKm7yre YJNcnm95bjQ2b/Owubh64Jpkk6ysUiyYUi4a5xC53UP/eNOXrO7mw0MTATu9ebjYdoV1 Pgd/MTEs+llJ20cglYFYtB8X5eHacBLj0UAXh1MmhA/yuu8L7t7mYRkaTi3xJrTEr0oa v/iFRMIT7pGgh80gLl00FcGCzrk4hSFNtIBaGdM2QPASGBA6rEAfcCHodZED2s5EmQm9 Cu2eBxTAkdPDsLUeag1c8weG4zx/gl0PNoQVjV9YeBxfFKcR9pIkCBMCQn1h7245oIOv HIUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=g6WOXENW7WX8DdQN2AnIBv+P/H8oQWA5leDhKVCB5PU=; b=oSrkb/j2fFBeVVlChunk6ou5z1ZGIgzxRilU/Kffx+CbWk2dzGdaHN1LWCPo201ew+ f79A+9+k+b3WWtSn0cprB0x0jeNpYF13XJ0taXNvBudtGCOPhbASJeG7mwk76VgEPIV6 Q8BpVCBusQt8r4H389iFT0XLSxtOogFGWbEComUii+MMuxqr3+oQcoC/06bYPcWqYmyU vDuB1o+6qQKjaMpPw8DXjNvk1kLGeGKbgDwL9IVz4QB3Zy+mJhFujXTpYxIxEUl6Tt3M axlV7iy3toqHqlH0O2bSgEjTIf+KbPt3e1KM2MopjZ7t0Hr+/UEoEuhg65CfmhzBKq8p b/3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=IN2JITV9; 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 g8-20020a056402090800b00462847f2128si16932230edz.107.2022.11.16.13.17.09; Wed, 16 Nov 2022 13:17:32 -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; dkim=pass header.i=@joelfernandes.org header.s=google header.b=IN2JITV9; 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 S234175AbiKPVJT (ORCPT + 91 others); Wed, 16 Nov 2022 16:09:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231448AbiKPVIu (ORCPT ); Wed, 16 Nov 2022 16:08:50 -0500 Received: from mail-oa1-x31.google.com (mail-oa1-x31.google.com [IPv6:2001:4860:4864:20::31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BF04BC0D for ; Wed, 16 Nov 2022 13:08:08 -0800 (PST) Received: by mail-oa1-x31.google.com with SMTP id 586e51a60fabf-1322d768ba7so21611141fac.5 for ; Wed, 16 Nov 2022 13:08:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=g6WOXENW7WX8DdQN2AnIBv+P/H8oQWA5leDhKVCB5PU=; b=IN2JITV99+mFdxD4DTqauw+JFm0+ykGGIE0IXqgxPI11e0JooNYGLa6GV0g98jl3fi PoqLlDVoJTBDkRv/d4fAeMs8VtNFN5HtP051grWq2ZPyt13a3UcgPAwHxeg/HW/6dU94 r6I1WMxTD/qqNss5NVb4PlwxPB4XcAKqBBN/0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=g6WOXENW7WX8DdQN2AnIBv+P/H8oQWA5leDhKVCB5PU=; b=IE7M85SmfWA8cRscRFkCEmIHhkXiQVTxcm3j+9F817cwCrpSLpHeO9at5iJu74nNVw CUkzSOrFusFPJixnhRp3+fr7l26woszWWIY6TDk1B2ikVCIkwaDKxLukuheEOf2TWRqF zK00u0lYn+KYIIuHJElJQesZJhFLgiZKhD/PhOuMhWR5WcZfS7fBDaoK3Yn3BV/S3Q8i vuasGdgTp7CsrvEbAJd7VE4ovbIzy29VqJwu/V9V5pD91LF/JfSvlkSHvIW+gQgU8CCS zzgMzC9wkUpRMhk1GVljqsr1xFb58nTjKjDC+uid46Cakgu7+jAQvmjGQUv4IzvOM7TF sQJA== X-Gm-Message-State: ANoB5pkS5WlJrB6Fcj3yEXHPXkIV7gSawyEXfnUq1+ziGGJbWyuSK2LT B2/N/r6sqdYseG/cFSxoYZXiotuTMZCHmQakEb9PRKmH+54= X-Received: by 2002:a05:6870:bacb:b0:13a:dd16:9b83 with SMTP id js11-20020a056870bacb00b0013add169b83mr2778705oab.15.1668632887526; Wed, 16 Nov 2022 13:08:07 -0800 (PST) MIME-Version: 1.0 References: <20221116195624.124092-1-joel@joelfernandes.org> <20221116151610.7294a9e8@gandalf.local.home> In-Reply-To: <20221116151610.7294a9e8@gandalf.local.home> From: Joel Fernandes Date: Wed, 16 Nov 2022 21:07:56 +0000 Message-ID: Subject: Re: [PATCH RFC] kexec: Freeze processes before kexec To: Steven Rostedt Cc: linux-kernel@vger.kernel.org, ribalda@google.com, zwisler@google.com, robdclark@gmail.com, Eric Biederman , kexec@lists.infradead.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 Hey Steve, On Wed, Nov 16, 2022 at 8:15 PM Steven Rostedt wrote: > > 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. I am OK with not checking the return of freeze_processes() and trying to shut down anyway. Will re-spin after any other feedback. Thanks, - Joel