Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AAF7733E379 for ; Fri, 20 Feb 2026 12:05:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.97.179.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771589131; cv=none; b=W0CMxKEISPIXucy3uyT5FpvZxxKXWy8IsvIqZNnq9nZT+UgwTp0gdXWieSrx44EiMBVlPd9y8taY6b06gVCac3D91NTfN961WEXBQNGAtbWSNfHzE9n+xSQxnpYQsmD7AVQadG/UZitb0M3vHi+g263fyMVondZ0B7M+Kkd6Jbw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771589131; c=relaxed/simple; bh=LXN6mcEyKg0+SHrbOr1WhRhpSrUMw9bS1qxAZAbAMz8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sKd0HkVfQVDsSF0prub5THBVpeCN5hCQPvKdSgpc9QGzYd3nZ//9Tgsa5+/YwQVp0QmtddL7o/mHQMK70AuiFs4KoqiCYmBWpploF3X9bKHjyfR/rXX99T/d+mEdLdbFA5LGlRicdPUdO7owjGMjX0muas3mGW+jNSGfpIN0OXM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com; spf=pass smtp.mailfrom=igalia.com; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b=ZfjjIc2u; arc=none smtp.client-ip=213.97.179.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=igalia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b="ZfjjIc2u" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=++opNExb/wa397ktAFbxHI8fjlPj+uf2w6iaXHPiALE=; b=ZfjjIc2uGJCzMxlHIX/a3Y0M0b +TGCrDhteH3C1qcyHMx8GaoAS3+oIfEfnznbd7c9rAqmLGFniXRiTqNiOYD6q5tSF09yFR5ioF4Ib WvzhBT6cnmZb33v0nFMsP31HFYM1MyIIBU04L/AGIf5+ndrJ/29hn5nWgqlMgRHXX6+Ff60XqUWyl oE+/GRqSkCX+Yq9N+vS4aY89YmYRPsWujLibmWzWgEi3939V2g0qE6VXU1ZyJz1g7ZXwhmHpCEZvB uA/Q5gyW0UeqTRWtPD1JSIKPgSIOfu3TyQzkmdi/UoXyYnjcNdVQQC7uwAgpU5I/8TCmS8H7p7b/7 jBjmW9Kw==; Received: from [90.240.106.137] (helo=localhost) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1vtPGC-002uyh-Ov; Fri, 20 Feb 2026 13:05:28 +0100 From: Tvrtko Ursulin To: criu@lists.linux.dev Cc: David Francis , Tvrtko Ursulin Subject: [RFC 05/26] plugins/amdgpu: Fix logging of failures to open files during restore init Date: Fri, 20 Feb 2026 12:04:53 +0000 Message-ID: <20260220120514.4540-6-tvrtko.ursulin@igalia.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260220120514.4540-1-tvrtko.ursulin@igalia.com> References: <20260220120514.4540-1-tvrtko.ursulin@igalia.com> Precedence: bulk X-Mailing-List: criu@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Currently failure to open files logs an unitialized stack string as the failed path. Lets just log the basename and drop the unused stack buffer. Signed-off-by: Tvrtko Ursulin --- plugins/amdgpu/amdgpu_plugin.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/amdgpu/amdgpu_plugin.c b/plugins/amdgpu/amdgpu_plugin.c index 5bcfbe13b1d7..4970fa0d5afd 100644 --- a/plugins/amdgpu/amdgpu_plugin.c +++ b/plugins/amdgpu/amdgpu_plugin.c @@ -1128,7 +1128,6 @@ int amdgpu_restore_init(void) int ret; unsigned char *buf; int num_handles = 0; - char img_path[PATH_MAX]; CriuRenderNode *rd = NULL; CriuKfd *e = NULL; @@ -1147,7 +1146,7 @@ int amdgpu_restore_init(void) ret = read_fp(img_fp, buf, img_size); if (ret) { - pr_perror("Unable to read from %s", img_path); + pr_perror("Unable to read from %s", dir->d_name); fclose(img_fp); xfree(buf); return ret; @@ -1169,7 +1168,7 @@ int amdgpu_restore_init(void) ret = read_fp(img_fp, buf, img_size); if (ret) { - pr_perror("Unable to read from %s", img_path); + pr_perror("Unable to read from %s", dir->d_name); fclose(img_fp); xfree(buf); return ret; -- 2.52.0