Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp559710rwb; Wed, 14 Dec 2022 22:27:44 -0800 (PST) X-Google-Smtp-Source: AA0mqf6wtuSF/e04NtkZg5sq28KZk4+mnkK0XuMz2ZJef57pY14ybtKh+xnb6985BguATUuwzI7h X-Received: by 2002:a05:6402:4502:b0:463:de93:d162 with SMTP id ez2-20020a056402450200b00463de93d162mr33249492edb.23.1671085664556; Wed, 14 Dec 2022 22:27:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671085664; cv=none; d=google.com; s=arc-20160816; b=jRhZexiSISHJroqLiZkUXGPWqnLWDUdvq3F+L6JHJzZ+MF2G361KTEjZwNHyP0tKYs 1aim9vloSswgfSp3bbBEw3lMAJ5h6yU6RcZbEiD/e8FrmANzG0xkVDis56J66e4ViJNn RwpssqSVFrp6hF8EGSxPVXvBh2KUhxIq77QYLAYkmTQ3iLI1B1SMQfbMZbvFOy69Naxj i1PLsPIQSDe/IcocpsUVBanYkPJzpdJWWNan8Db3xq0xZ9FtbKbPx37bnADU5+tVbeBa Fk1KIkAWxUNZxdawzk4Q1//SSF8X/8eax4RVw9cAA7g2OLzzTVn/9XR+z0TqJ6iY8bvh q/2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=txxZyi1fNvIRHpcRd9K+cXPr9cLQU3hMoUsOwHCO7+c=; b=K3S0ILpVXHq6WZsivGMoa3Gde2R8tdebMXlZh21Zxx1xHK5eVYe34Ku0hY6HqsbRos 6pAvdIYFYn1GelVlLszb5nguMIRVLYoqNk4cId50xiXHUYl/hCMtriaOmYs8MxI+r1KA VEInD3CRdUjl7yh/hPCT6flGK8N2ql1aIPm/UhrivzL2ikF/4XJ+mANlhp97m9ZyGJed njqrRr2oGzZWGsLtBzCafab8DgpGNlUb9uunum++uQ6r60TyGa5IARTZsxq7o07xNVJr 0VzMiU+fv+2stb5JWXJg7mDeqlc0PDgALM8xE8BzJkNWNryDXiM7HE7vOYiaf3PlnZoi ehEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=JQ1Y+sAE; 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=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r14-20020a05640251ce00b0046b4ea89840si16453914edd.317.2022.12.14.22.27.28; Wed, 14 Dec 2022 22:27:44 -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=@linux.microsoft.com header.s=default header.b=JQ1Y+sAE; 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=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229681AbiLOGUu (ORCPT + 70 others); Thu, 15 Dec 2022 01:20:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229601AbiLOGUt (ORCPT ); Thu, 15 Dec 2022 01:20:49 -0500 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 59DE85445B; Wed, 14 Dec 2022 22:20:48 -0800 (PST) Received: by linux.microsoft.com (Postfix, from userid 1134) id 089FA20A67F7; Wed, 14 Dec 2022 22:20:48 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 089FA20A67F7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1671085248; bh=txxZyi1fNvIRHpcRd9K+cXPr9cLQU3hMoUsOwHCO7+c=; h=From:To:Cc:Subject:Date:From; b=JQ1Y+sAEo6sEG5h4xiaOtmSAdNZWGQsvnWygTZhRmYSSK34IJw0WGsLWAgCx+MXVe SG0+su7trpA41/t/CGq5cDvNVqRQxf1uM9EL5+I2JDtgEOcySWQVDX1cPzEQBYdJ2o 1QbMXJnK1nlDzfBgH5Bv5XYbnqMSsyscHgIJPWC4= From: Shradha Gupta To: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Cc: Shradha Gupta , "Rafael J. Wysocki" , Pavel Machek , Len Brown , Dexuan Cui , Michael Kelley Subject: [PATCH] kernel: power: swap: Suppress expected 'Image not found' error on Ubuntu Date: Wed, 14 Dec 2022 22:20:26 -0800 Message-Id: <1671085226-21347-1-git-send-email-shradhagupta@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 X-Spam-Status: No, score=-19.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 In 'systemctl hibernate' if resume device is written to the sysfs resume parameter, a software_resume() call is triggerred. This call is expected to fail in swsusp_check() call with -EBUSY error and an 'Image not found' error message. This fix suppresses the expected failure message from getting logged in Ubuntu setups where CONFIG_DYNAMIC_DEBUG is enabled by default. Signed-off-by: Shradha Gupta --- kernel/power/swap.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kernel/power/swap.c b/kernel/power/swap.c index 277434b6c0bf..9cbd3edc8339 100644 --- a/kernel/power/swap.c +++ b/kernel/power/swap.c @@ -1552,6 +1552,14 @@ int swsusp_check(void) pr_debug("Image signature found, resuming\n"); } else { error = PTR_ERR(hib_resume_bdev); + /* + * If this call is triggered by `systemctl hibernate`, the + * call is expected to fail with -EBUSY error. + * TODO: Figure out a better way to suppress the error msg + * in this case. + */ + if (error == -EBUSY) + return error; } if (error) -- 2.37.2