From nobody Mon May 25 06:43:16 2026 Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E8C312FE074 for ; Sun, 17 May 2026 19:26:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779046017; cv=none; b=NVc4ao/UVteA6bWbydR/qM/omY83RDa/WmH31gxbtJaMTl7DSMSS1yG680AaYqAHA1pX2wO+ooLkE75ixgDfgLoJ9qLYREppKPQcthVobJ2z9BoGZVKcDK7+lKnBIUOEs/35m3KYAlr+DE9kLXP3wycJbofr1u74sOYBVtGjDkg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779046017; c=relaxed/simple; bh=pLvQu9jsNztI8U/cRJwRQ1VYDE5qRkJfV4sAFyvwGFs=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ufhcgp/gHC5gMLvf8eoxjfeuXTBVjCKfw9VjgtiUmI0Fq/P3NAB3dtna2uQBHA60XcBhKCpMwe3XXDp/XuR7osWRLH96Mmcx4H86xEXhz1MihcxmTliZK+l0fMJSxdftrlBF8SLTXU69NpJs7R/Pe8RjKfSvWgp9tB8wNAqCeZo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=soleen.com; spf=pass smtp.mailfrom=soleen.com; dkim=pass (2048-bit key) header.d=soleen.com header.i=@soleen.com header.b=V1HFsVcE; arc=none smtp.client-ip=209.85.160.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=soleen.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=soleen.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=soleen.com header.i=@soleen.com header.b="V1HFsVcE" Received: by mail-qt1-f179.google.com with SMTP id d75a77b69052e-50e594413c2so12033591cf.0 for ; Sun, 17 May 2026 12:26:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1779046015; x=1779650815; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=kzbLbrBxTj3Os65r+VG8KyOSku+VVjAs9NkmdJFxbWQ=; b=V1HFsVcEi51lIoGA4QFMiasNDVMnPrQz1Bz1vaAxYsCec1QN34GNnmJBbsyDxpwhB5 66gXp+9ivEVT9p0y9X0PTpjU7SSZ9rru0KoJ6/CA/kO6BBbx8Wc12FnFzvXsa3ql48mQ QLBPc4mgEtStQqb9FlVu+yXDnqMj+0fvbAqx7wQfm7Jt1Bae0Alc698++WJz3wLSKVgq IOnVpE1cJAVKX10CU4Cm28NkWlrtP1Y4Y/yYkRTZRIrAWeCLxBgTIeUnBeU6lVy+lAVZ 5dOrxilpgcpHjJuz1VVdfsBcP7m6JbEFTvo0iglLpgmRyxROpnlxnE6+4JXliu4JjGnn 6+fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779046015; x=1779650815; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=kzbLbrBxTj3Os65r+VG8KyOSku+VVjAs9NkmdJFxbWQ=; b=Bb+VCWmo4IXF7HJmcxFVxqS4CKEVgVEorEUoCKFge8TIpbVZ9/9Z0MEnvc2/AwhIKS +7YXX2m5gPBYNR7F3Qf8tVI9Dl73jNFoNWDBi5LV6gT/J6urxsmPpB0JILY8PB1aqmzm A1b6Pw4ldzGT4SUkT0J++DmKzNcvNGgsl1YWORcQ9y6QSWrXKZh2M0RkFoYP/qfHZNLX IAbNV1uxhmqs2NAF5mcP+uqK+o40v+N2dsdSdZfp7ZaSTcjNYrsy3/t/+6lby0RZwqOA P4YafPJAXjNqSSe6HtCjBt9q5tx+3dOMoX5YZ72GQeoWZ+sC1tHXYFK9msClW2AMh4L4 oLTQ== X-Forwarded-Encrypted: i=1; AFNElJ/33r8L7LJrM9Hit0m2t6WV6eR+ia+utiOY+hJLERXOJCNVsvIQ7gn9qkyKQV6bm3iaX6ODlCL/5F0omWY=@vger.kernel.org X-Gm-Message-State: AOJu0YwUzVqRrHszs+hBGhtGLSHtnBnbeojxBSSsoB723WQ/H4GvsF8C v7CSZCjXtryrgEQu4faHep9v0wVnvGJUq9vz2PS5ZiWOwQjApDN8LXSZ62q1CjIFUTQ= X-Gm-Gg: Acq92OE1g6MugXll1ocONS3pOzXHlXvqkdQ8YUo8OL2PP1N9QElYAbGJ/ANrDKFtRj6 mqkIpP9t3yDs94ffdwIZ1bDItu8yDN2ycZ2GrSNf8L4CSisOWKqwZXC2nLxawz5Gj00OPXu+5UR ul7Wm66OefdKu2czR6tM6XNP/oph9ud3VmFWJ8o5zBNte5sAGODyvaBJwkpACBEUTc1VOXrq5Bp pCpaD0Y8UYsV2pEWYLNPbU5cyAxa9tpucodvybvFreMqpxKgckQhAGRiDPjKoNEylUtQc5BVZJN vnADc3TNOctV0D99s+GJdeYRnX6UyrJN+lrTOQLTCF9y4e7KTiR/bD5hASOffqfCJHdyPxPAzVt N52Lrpi+uov2qLSwC12G6PQ+q2x/5hOaF+mXqxWej4irnOkAgn8891ZTixFevg/3RWdHSVYDzVD Ybr1IL8LmmDyTz0eOKMxUXSqJzya5N5+2pjVYYjo5Vg4vY1SU3xLA= X-Received: by 2002:a05:622a:211:b0:50b:2542:e16f with SMTP id d75a77b69052e-516597f0c9cmr161422881cf.15.1779046015040; Sun, 17 May 2026 12:26:55 -0700 (PDT) Received: from plex ([71.181.43.54]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-516456d5c4dsm108828621cf.12.2026.05.17.12.26.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2026 12:26:54 -0700 (PDT) From: Pasha Tatashin To: rppt@kernel.org, sourabhjain@linux.ibm.com, jbouron@amazon.com, akpm@linux-foundation.org, bhe@redhat.com, linux-kernel@vger.kernel.org, dan.carpenter@linaro.org, liaoyuanhong@vivo.com, pasha.tatashin@soleen.com, rafael.j.wysocki@intel.com, piliu@redhat.com, kexec@lists.infradead.org, pratyush@kernel.org, skhawaja@google.com, graf@amazon.com, mario.limonciello@amd.com Subject: [PATCH v4 1/5] liveupdate: skip serialization for context-preserving kexec Date: Sun, 17 May 2026 19:26:46 +0000 Message-ID: <20260517192650.1019314-2-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260517192650.1019314-1-pasha.tatashin@soleen.com> References: <20260517192650.1019314-1-pasha.tatashin@soleen.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" A preserve_context kexec returns to the current kernel, which is unrelated to live update where the state is passed to the next kernel. Skip liveupdate_reboot() in this case to avoid serialization and prevent sessions from being left in a frozen state upon return. Fixes: db8bed8082dc ("kexec: call liveupdate_reboot() before kexec") Reported-by: Oskar Gerlicz Kowalczuk Reviewed-by: Pratyush Yadav (Google) Signed-off-by: Pasha Tatashin Acked-by: Mike Rapoport (Microsoft) --- kernel/kexec_core.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c index a43d2da0fe3e..dc770b9a6d05 100644 --- a/kernel/kexec_core.c +++ b/kernel/kexec_core.c @@ -1146,9 +1146,11 @@ int kernel_kexec(void) goto Unlock; } =20 - error =3D liveupdate_reboot(); - if (error) - goto Unlock; + if (!kexec_image->preserve_context) { + error =3D liveupdate_reboot(); + if (error) + goto Unlock; + } =20 #ifdef CONFIG_KEXEC_JUMP if (kexec_image->preserve_context) { --=20 2.53.0 From nobody Mon May 25 06:43:16 2026 Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B0DB3CF02A for ; Sun, 17 May 2026 19:26:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779046019; cv=none; b=ZFkKaErEJyWYmLe1CsAIvHrAxPI99oJ02y0WivY2CdaLvC4W/zAMKPDe4ukaHfFN1do+aw+RohTukfF0b+yHyyhLHW8xCklLc1iVscy7DLa5XMiPL2PRWbUkIRcfQuoFzYcXI25QFuXV9a/KAHaD8SIlgw9Zut7k7d6VgXaISYo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779046019; c=relaxed/simple; bh=KTEbwfCZY0TfoOyOK8d/cW7KW5gLRoQgRxmRiRM5VlY=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UjP+0xz0DKrEywCFybhH3nACq1C2vsScfBjor+wJYJQ2Ke0sdj4m860Ly4Zq2zQmWyzIn0bgsgl3697Hf3OMI6ujuCAlvqvKIJShwzIzSKd//6gUCeKEIy6c8qyDQyAaZvpAmXw6PFlqfUnI4EqgdMzHTYqR6I3A8IX1yVQKPKQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=soleen.com; spf=pass smtp.mailfrom=soleen.com; dkim=pass (2048-bit key) header.d=soleen.com header.i=@soleen.com header.b=Uja91xln; arc=none smtp.client-ip=209.85.160.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=soleen.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=soleen.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=soleen.com header.i=@soleen.com header.b="Uja91xln" Received: by mail-qt1-f170.google.com with SMTP id d75a77b69052e-5102582e23eso14832081cf.1 for ; Sun, 17 May 2026 12:26:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1779046016; x=1779650816; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=4LnA2m0HBgYoRoNlBSHl4zr1o2yEpdKjWvd1WzFSz2c=; b=Uja91xlnYcrX5k/9DDRHd5/lecmwVk0goFabwkKQiy6Jk+eImf5AVCYKjg+yV2sIbC mEt9TR+VhgC8HDXTD+Ppuq5ATHULAIji3qX8valWF5avaZ33PF7Th5+49EOpPxnkQHgO +RK1q9TK+HTuddsFdTo2zIGx0Igt31saIUzR6gsgLEmCnWLZugyXq21PYBr7MoGLMkbW VBOwwjjdGXmr6ETTnTeef8ogq2SoCAIcwoCegDuXljWVqAYTBqmW9hoPZZZK1cDk03cE NqlVd0fo5w/h3yhnNtg9855iDozfHC7IjeBm82pGS3Y2Ohlxx6R6FuUm19s2RGnSSTsm Vhyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779046016; x=1779650816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=4LnA2m0HBgYoRoNlBSHl4zr1o2yEpdKjWvd1WzFSz2c=; b=b1WI9Nv9joBnSGlU1IaX7eRYunJFY98pd7GQ0WQmYI6sz1X9wKio8a3M7nH1dbeg6x 3tD7TciL5QPJZ7Hbe/CP9qABAWGSm0h1q1zppOv0YV8mhl9s6iB+232GG3gWCHkG2K3a WdV1kvif7/Kt9lC1knlw04P76VBrUyRwQDSF4lhBViQvuUZXd1JesmmQ+v6ziGlOzjHc 92ETN5wE/pd8UuALu2U03dWbVDkKEBinmoTBHGi16d17/qUe1fGmhY95wTRBHFXq2uoJ oNQqZLt4tZ4VATlQ6ZI08muyXLik20xK/mXTfgid/xFKT6YW/6LGDa6dqlW4xJViogP/ JxcQ== X-Forwarded-Encrypted: i=1; AFNElJ9wjtdtziWMlVvGa7hx7i0ivCMUUdbEf2nM7g+4oZg86NyGL7uN3+QJNf/C4KQAbbHApwhDjO0jVOyD/9s=@vger.kernel.org X-Gm-Message-State: AOJu0YwhriopvLEPWul07wT9JnJOzbVb4bBVKaVLxyw6DIpkyOEQ1P5w rYM1mDHNs5IQa+xIRK39LQVQvin6w/2Qso6zf53blLNWBowS3qCX3qi7HsTGkRmeE+k= X-Gm-Gg: Acq92OHezqrH9e1xukv8BI0lx7ZdIUdIL5tmzvfggG5JgFvNPXSzhrMx8rZKv+AH7Gi DcwwXv88OnKuuaopAeDQ+02rZ/jEHisYjJoSmMWrP/iB8Hjgqf4B3bz1NbZ3FquWbY6uFZ/5WHX 9TzKY6p27NV/56AAAnfZtE27getLg8Y/6foZKTPjqssxt+fzVu+tzj63fWMdNtVwqjXuiY7k3DC JnFvvOLiueyN7ivxOFMwlv/YX2nDTXWVR/6wqnPJDADhwim/z7oC+4+ei+kUXETKfwkYmsxalx/ bT1H6S311hbxdwynDxebY7iyQoNVMTMk21rrsxhJe52v4sA4nDbx8Mh3/9HcQRIIDi+O3WbcRt7 jcp2yFGvSyAkhDXtuhNJs48vFJAjoi3LVn0WZqCdTjAe9TaSOvr7ShhECaZ0i6o3QTWYax/sZBx aGCypB5TfnbmalyVPDwq6KH69oipH7zTc0Z0DoNzflWHvY+P0qLBS8KJp7y3l4sg== X-Received: by 2002:a05:622a:4a0f:b0:50d:8009:2b3d with SMTP id d75a77b69052e-5165a03ad85mr178171821cf.13.1779046016534; Sun, 17 May 2026 12:26:56 -0700 (PDT) Received: from plex ([71.181.43.54]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-516456d5c4dsm108828621cf.12.2026.05.17.12.26.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2026 12:26:55 -0700 (PDT) From: Pasha Tatashin To: rppt@kernel.org, sourabhjain@linux.ibm.com, jbouron@amazon.com, akpm@linux-foundation.org, bhe@redhat.com, linux-kernel@vger.kernel.org, dan.carpenter@linaro.org, liaoyuanhong@vivo.com, pasha.tatashin@soleen.com, rafael.j.wysocki@intel.com, piliu@redhat.com, kexec@lists.infradead.org, pratyush@kernel.org, skhawaja@google.com, graf@amazon.com, mario.limonciello@amd.com Subject: [PATCH v4 2/5] liveupdate: fix TOCTOU race in luo_session_retrieve() Date: Sun, 17 May 2026 19:26:47 +0000 Message-ID: <20260517192650.1019314-3-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260517192650.1019314-1-pasha.tatashin@soleen.com> References: <20260517192650.1019314-1-pasha.tatashin@soleen.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Extend the scope of the rwsem_read lock in luo_session_retrieve() to overlap with the acquisition of the session mutex. This prevents a concurrent thread from releasing and freeing the session between the lookup and the mutex lock. Fixes: 0153094d03df ("liveupdate: luo_session: add sessions support") Signed-off-by: Pasha Tatashin Acked-by: Mike Rapoport (Microsoft) --- kernel/liveupdate/luo_session.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/kernel/liveupdate/luo_session.c b/kernel/liveupdate/luo_sessio= n.c index a3327a28fc1f..59b37d17db6b 100644 --- a/kernel/liveupdate/luo_session.c +++ b/kernel/liveupdate/luo_session.c @@ -415,12 +415,11 @@ int luo_session_retrieve(const char *name, struct fil= e **filep) struct luo_session *it; int err; =20 - scoped_guard(rwsem_read, &sh->rwsem) { - list_for_each_entry(it, &sh->list, list) { - if (!strncmp(it->name, name, sizeof(it->name))) { - session =3D it; - break; - } + guard(rwsem_read)(&sh->rwsem); + list_for_each_entry(it, &sh->list, list) { + if (!strncmp(it->name, name, sizeof(it->name))) { + session =3D it; + break; } } =20 --=20 2.53.0 From nobody Mon May 25 06:43:16 2026 Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com [209.85.160.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9C6EE3CF02C for ; Sun, 17 May 2026 19:26:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779046024; cv=none; b=UrIRpLFaovqLk+YUnQzV5X7ImWfE2UJDULzs9btez4u3Q/mYwUo8XgJd4IvR3MoKHtyu6MpHWkEWxPaPxgpipwOHGS2mgUGT7dtyjCUZu/jUC2ZwSHAUi1SfdTJQU5lYml9qAt701fGbjGbPA4lgH0Q1v38+egSSCrVKPBPgTCw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779046024; c=relaxed/simple; bh=SxAPq3IblDrfHvS1DgX7G8CRC3Gr5qEzN8pCowuESV4=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rs68hdDwZ95MOZHVLBrN8fbBYaMkSuIoEg032PBdYVtxaZr1XRpuLCSO0wVnkSMFLRJ3DF//5Jk2kDvCfi4a4XujFIBQ/WYkQflLBdsswU0E5WyF7zWo6wcJ8rw2JyLqI/6O5ZmlIGJS62QYWxwqAiG7ShediCDuYARLL/beyOA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=soleen.com; spf=pass smtp.mailfrom=soleen.com; dkim=pass (2048-bit key) header.d=soleen.com header.i=@soleen.com header.b=C6xocD0n; arc=none smtp.client-ip=209.85.160.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=soleen.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=soleen.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=soleen.com header.i=@soleen.com header.b="C6xocD0n" Received: by mail-qt1-f178.google.com with SMTP id d75a77b69052e-50fb1ad3734so30410361cf.1 for ; Sun, 17 May 2026 12:26:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1779046018; x=1779650818; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=IaFXHj+nOOniyoasttf/PvlR/IAc0qdJJnVbcz5jRsQ=; b=C6xocD0neXjJGetlf/90NZqaKyd0gOLByzrvxmkc9xswtExq3t3zpMOeO3TPz5ezgA 4pSVB/NhP6k0Yo37tx8s//Sr7ZMpaAVmo8COXFeM74/8WywOwP+6Kg8L4tFcpQoR+pN7 RsDOT69D/i24O9kNhqqAl1HsEtbmM3OMGA37oJlbOIr/Gp2wgddG0Ilndjt3/6jZNKFZ aDrIvOH4rxI6PC5W8CzyCoG6hF0u/w2DyA9faDnBrFKwRjrHiW6y8hBSw9ffL3qGGn+t kufeEU8mrNOc+ERUQCeW0BxHD8ktj//DLZ12DnItMNzQsah3hiNmxortJ9kleal1Loxa dhxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779046018; x=1779650818; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=IaFXHj+nOOniyoasttf/PvlR/IAc0qdJJnVbcz5jRsQ=; b=qYZx+SLV5UsGxZbcBBItNgkrcqNUHBSejYuvk7IGTmX7U4yv58g1aAY98LL2l9VJKm p2rsRGsjGGtCBeTkF0FiTh+KZnRKE9xIZToMekFFiDyvrmEEr4rQHTaIvav5qCvvIyxo blrSLxngJ/rc6xdtcgDCBJG8DXalHHgdHTAq+2B6zCkUw65EgBkSCMCCFToDOLbZgb26 Ts/DsUxXDybXTHB7oPqzSy4T6I9mxynYoizrfhbtKCXVqgz/d7K379ZJCsNyPomQxpt4 FGAB2jY4svADsDhMiGQdLPZJGgMTKqYVBYgzwnhjVp7s9pyzzWyjqFy9r8/Bidq6k9H5 qPMg== X-Forwarded-Encrypted: i=1; AFNElJ9BoJRoM3n/F3Lp8CsYHZMctQ6Hks4KRJ4iqVEUkLurtRHTGt70tBwsng4Jq0WUhJ1LSC+xjrlFV3FpaTU=@vger.kernel.org X-Gm-Message-State: AOJu0YyGcVSbgvRcSWJStZitjcrFI4+h0Y9iagle9MiO5OMyQ+p46UZe F+WOZzbn3PYFhVBJTluK4Rf88k3nxQiwsfmkG8MzCoUAjhZHP5bRkVh/wjprAohLTjU= X-Gm-Gg: Acq92OEZq3iYBEdViCm3RZdRErlU6rgQvQTajaKbSBbYbBaOvN5j/3LMuDttTooMkXb xoDb8j29VuiF8ZHq2xK3aCCtMvNswsGdlsIhOyxNhUAa4V7mHv8W3BYBRpOtPDQkqSZz+2kjxu+ EVN3BFC4PfFUwvG/khDn2Wk7Y0IDfd3OpDEccajoi7EOriYB05fsEHJXiIcLJF93CPwkuROsMhp 6/2RWCPVeVoab8AUumpimk63IfD3N3bZw/NTx+txA/GAAGqnS+q03vxkhn3dd3ISTHsyFtCKccZ PrSMj8+yZGFqsQAVWMb8LyViX0XlhnzPtLV4WZ5j/KFmMpP/38zkYv+/U/tKRFy1XPnaOzSvEZB hPpdTD72CMs0ve+2Au0Wracfw9oMxsMdUNDvEq54IRb6aVjtqpriV2cOJk8irUiS3bqZblNYaKD gH7TRfWNQL7nZaieCC0BR7QmCj7yNbyxP30D2xdqlk5JBTbuSqxrUCLQMs3lTq9A== X-Received: by 2002:a05:622a:4acd:b0:50e:61ea:d8e0 with SMTP id d75a77b69052e-5165984aa8bmr143676721cf.21.1779046018539; Sun, 17 May 2026 12:26:58 -0700 (PDT) Received: from plex ([71.181.43.54]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-516456d5c4dsm108828621cf.12.2026.05.17.12.26.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2026 12:26:57 -0700 (PDT) From: Pasha Tatashin To: rppt@kernel.org, sourabhjain@linux.ibm.com, jbouron@amazon.com, akpm@linux-foundation.org, bhe@redhat.com, linux-kernel@vger.kernel.org, dan.carpenter@linaro.org, liaoyuanhong@vivo.com, pasha.tatashin@soleen.com, rafael.j.wysocki@intel.com, piliu@redhat.com, kexec@lists.infradead.org, pratyush@kernel.org, skhawaja@google.com, graf@amazon.com, mario.limonciello@amd.com Subject: [PATCH v4 3/5] liveupdate: block session mutations during reboot Date: Sun, 17 May 2026 19:26:48 +0000 Message-ID: <20260517192650.1019314-4-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260517192650.1019314-1-pasha.tatashin@soleen.com> References: <20260517192650.1019314-1-pasha.tatashin@soleen.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" During the reboot() syscall, user processes may still be running concurrently and attempting to mutate sessions (e.g., creating, retrieving, or releasing sessions). To prevent this, introduce luo_session_serialize_rwsem to synchronize mutations with the serialization process. All session mutation operations (create, retrieve, release, ioctl) take the read lock. The serialization process (luo_session_serialize) takes the write lock and holds it indefinitely on success. This effectively freezes the LUO session subsystem during the transition to the new kernel. If serialization fails, the lock is released to allow recovery. Fixes: 0153094d03df ("liveupdate: luo_session: add sessions support") Reported-by: Oskar Gerlicz Kowalczuk Signed-off-by: Pasha Tatashin Acked-by: Mike Rapoport (Microsoft) --- kernel/liveupdate/luo_session.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/kernel/liveupdate/luo_session.c b/kernel/liveupdate/luo_sessio= n.c index 59b37d17db6b..6099213275d8 100644 --- a/kernel/liveupdate/luo_session.c +++ b/kernel/liveupdate/luo_session.c @@ -75,6 +75,13 @@ sizeof(struct luo_session_header_ser)) / \ sizeof(struct luo_session_ser)) =20 +/* + * Protects session mutations during serialization. All session mutation + * operations must hold the read lock. The serialization process holds the= write + * lock indefinitely on success to block all concurrent and future mutatio= ns. + */ +static DECLARE_RWSEM(luo_session_serialize_rwsem); + /** * struct luo_session_header - Header struct for managing LUO sessions. * @count: The number of sessions currently tracked in the @list. @@ -205,6 +212,7 @@ static int luo_session_release(struct inode *inodep, st= ruct file *filep) struct luo_session *session =3D filep->private_data; struct luo_session_header *sh; =20 + guard(rwsem_read)(&luo_session_serialize_rwsem); /* If retrieved is set, it means this session is from incoming list */ if (session->retrieved) { int err =3D luo_session_finish_one(session); @@ -354,6 +362,7 @@ static long luo_session_ioctl(struct file *filep, unsig= ned int cmd, if (ret) return ret; =20 + guard(rwsem_read)(&luo_session_serialize_rwsem); return op->execute(session, &ucmd); } =20 @@ -385,9 +394,12 @@ int luo_session_create(const char *name, struct file *= *filep) struct luo_session *session; int err; =20 + down_read(&luo_session_serialize_rwsem); session =3D luo_session_alloc(name); - if (IS_ERR(session)) - return PTR_ERR(session); + if (IS_ERR(session)) { + err =3D PTR_ERR(session); + goto err_unlock; + } =20 err =3D luo_session_insert(&luo_session_global.outgoing, session); if (err) @@ -398,12 +410,16 @@ int luo_session_create(const char *name, struct file = **filep) if (err) goto err_remove; =20 + up_read(&luo_session_serialize_rwsem); + return 0; =20 err_remove: luo_session_remove(&luo_session_global.outgoing, session); err_free: luo_session_free(session); +err_unlock: + up_read(&luo_session_serialize_rwsem); =20 return err; } @@ -415,6 +431,7 @@ int luo_session_retrieve(const char *name, struct file = **filep) struct luo_session *it; int err; =20 + guard(rwsem_read)(&luo_session_serialize_rwsem); guard(rwsem_read)(&sh->rwsem); list_for_each_entry(it, &sh->list, list) { if (!strncmp(it->name, name, sizeof(it->name))) { @@ -582,7 +599,8 @@ int luo_session_serialize(void) int i =3D 0; int err; =20 - guard(rwsem_write)(&sh->rwsem); + down_write(&luo_session_serialize_rwsem); + down_write(&sh->rwsem); list_for_each_entry(session, &sh->list, list) { err =3D luo_session_freeze_one(session, &sh->ser[i]); if (err) @@ -593,6 +611,7 @@ int luo_session_serialize(void) i++; } sh->header_ser->count =3D sh->count; + up_write(&sh->rwsem); =20 return 0; =20 @@ -602,6 +621,8 @@ int luo_session_serialize(void) luo_session_unfreeze_one(session, &sh->ser[i]); memset(sh->ser[i].name, 0, sizeof(sh->ser[i].name)); } + up_write(&sh->rwsem); + up_write(&luo_session_serialize_rwsem); =20 return err; } --=20 2.53.0 From nobody Mon May 25 06:43:16 2026 Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com [209.85.160.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9A37B2FE074 for ; Sun, 17 May 2026 19:27:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779046023; cv=none; b=bskxDivON/NXHqEMyAtoMfoLvB9CrHB+fkd626n6xyZ8XbWUrY7q8PkR+7+HavVB1j9aDfg674OWpUb1BC45Ld9oS6ARq9yZ8tBDQRd1rmo/kUY8oyKWpEGnfNFaFhDKYaDUXHWoYlEp8m+s1/DgldGknVbZXh5V0Ji1E5DGcnM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779046023; c=relaxed/simple; bh=FxF0D5TfSSjKJUdTNxig64369W3YFxX2otRsijnWFaI=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ncsNBybE5+/m5XbpZa5Sd9lfmJic2Oepeo9M8Y8JMQGYYeB/+zJDM1SVtyoYhAvJfD+m0yI3eJ8y1emdNd5xJ/xxGPGmFx9MfdcWGT2QN4N6458VuuUTR8F8mTldx1g/qHxFs80CieLdRupHUZ9es1J3zB2jpbNUV2GxHtTO6/8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=soleen.com; spf=pass smtp.mailfrom=soleen.com; dkim=pass (2048-bit key) header.d=soleen.com header.i=@soleen.com header.b=Po+ld05v; arc=none smtp.client-ip=209.85.160.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=soleen.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=soleen.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=soleen.com header.i=@soleen.com header.b="Po+ld05v" Received: by mail-qt1-f177.google.com with SMTP id d75a77b69052e-50d7c12e48eso18718121cf.1 for ; Sun, 17 May 2026 12:27:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1779046020; x=1779650820; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=29HzJl9h48xwkBaF6APPD+FEfyf2PDWXL3k0ngsRfSI=; b=Po+ld05vI0Md0ld3hC+oYXdn52BNFo65PfmlyhhaYsot2D0Pnxwc7r6FG0/8cDQVpv Z6v24uGQylIYVe7qshoHJGF3w2uVeBf/cqtIR7THFy/G3yyREGIEwxUhYBi5gpr2XpkG MHK7g8IvSDP8zjbBTfDm6Bz3WitJxSCkDQpLtEe4d+k2BNklJABLUzLYzomJ2VkVt8Fq RfjClRXwILqH2gdewoQQ0NRcVA5V5NwVW5tbNlJ1TQALiHk8RYx0tUCcF8vXqU+aQfQh 8h51pr3Eh5iDWBfbapMq+PIIq/mcITZ0/m4/VEZRmQmWaFW+x4i5C8ae9hK5ttX48WlU 83BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779046020; x=1779650820; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=29HzJl9h48xwkBaF6APPD+FEfyf2PDWXL3k0ngsRfSI=; b=UttBLFEzOttEFf7oWYfrXOgmo5QB+j3Kus09PnAo3z8MQ2/MW9VFo2ALhXKUrT3B1J uqKkATIllsb1qJmDIJzLHUCObMF4SPYY6PXhREetwiDDY/mBEblKSiLkkedwMRoDcAcb Kqc/+bvlzo0YA6uumgsZmV6h31hPz86W9t/Y9Uf2yz86wA2760iHONd9FXCSwm7NFbPm kbOMTmpW7vqXsLitJRzCh4J/sA8Qw7PUK/HlyvKWQURun/DRCY82LC+/onCSeTDdCs+R gauNh7GV/H0gNKGdUe5MJmxEhZTLEnO5cAaojyeDCC+Rmn2EyT/pP8LfVleMVey2CV97 7TuQ== X-Forwarded-Encrypted: i=1; AFNElJ9JWPnqVPrPhFO+gAJFcOKR02g405hgTkIIdhx8LZf6Y1XOPibXvCCxPNON8XXIUDnvdYiW9D51xawViCc=@vger.kernel.org X-Gm-Message-State: AOJu0Yxrg7zM48Ui9RWnnPmfM9PR0jvt3F29XIzFHlkRkbjOJ2n2Hgx2 V539xMnh904Q+JFmokA8/3z5jCgKtokrmv1dodmjw27wTk0KDuFIKjeFNJFN/7exx2E= X-Gm-Gg: Acq92OGHWMp1sAhgPy9c6xH4Te/kInobaHHZC48vOL2yCBbh21SbvlZSrjh2KP8vno7 SENyIgyBbNc3hV9OjWiy2t3dNauocbxbgn3If54rN/A2/spAv5ajaAPzswRGlZ4fEu6+mXrWPiN 1YT+OYxMs+5TYNoywlJfDQa+DR7jv8ODFoMyuFm4Fr3mgrOfsFZeHNo8dd0IbWQYTyWFkBTz4WT bhHK5up6vY0EGWg+sBl6tcrOMmX3Cs7mt6lNgXLAdp+onWQSECe0HVYmCKq+nDregdJzzBtDNmv XJ6CmZX0iQCgF5qTnZ9rdvAFbB80HloNRBYlaFv3puS8huHrBLgaofucNDtWaIHG8Q/con4eIfm 9Nmxx1shRoLUN0XcGMM42pdSabo/aj+eFRUzsKrCVpp8U7Q03UrbaP/Lrk5/FcxbFrlpZxLYVVN 7oWtqqb05Zv3aCG7ESmpqtDreIDnCR+mgujndWkV2XTzGBxoaIdWA= X-Received: by 2002:ac8:5913:0:b0:50d:a8bd:dc07 with SMTP id d75a77b69052e-5164193a473mr218531351cf.35.1779046020429; Sun, 17 May 2026 12:27:00 -0700 (PDT) Received: from plex ([71.181.43.54]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-516456d5c4dsm108828621cf.12.2026.05.17.12.26.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2026 12:26:59 -0700 (PDT) From: Pasha Tatashin To: rppt@kernel.org, sourabhjain@linux.ibm.com, jbouron@amazon.com, akpm@linux-foundation.org, bhe@redhat.com, linux-kernel@vger.kernel.org, dan.carpenter@linaro.org, liaoyuanhong@vivo.com, pasha.tatashin@soleen.com, rafael.j.wysocki@intel.com, piliu@redhat.com, kexec@lists.infradead.org, pratyush@kernel.org, skhawaja@google.com, graf@amazon.com, mario.limonciello@amd.com Subject: [PATCH v4 4/5] liveupdate: fix u-a-f in luo_file_unpreserve_files() and luo_file_finish() Date: Sun, 17 May 2026 19:26:49 +0000 Message-ID: <20260517192650.1019314-5-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260517192650.1019314-1-pasha.tatashin@soleen.com> References: <20260517192650.1019314-1-pasha.tatashin@soleen.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" In luo_file_unpreserve_files() and luo_file_finish(), reorder module_put() and xa_erase() to ensure the file handler module remains pinned while its operations are being accessed. Specifically, luo_get_id() dereferences fh->ops->get_id, so the module reference must be held until after xa_erase() (which calls luo_get_id) completes. For luo_file_finish(), this requires moving the module_put() call out of the luo_file_finish_one() helper and into the main loop of luo_file_finish() itself. Fixes: 00d0b372374f ("liveupdate: prevent double management of files") Signed-off-by: Pasha Tatashin Acked-by: Mike Rapoport (Microsoft) --- kernel/liveupdate/luo_file.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/liveupdate/luo_file.c b/kernel/liveupdate/luo_file.c index a0a419085e28..208987502f73 100644 --- a/kernel/liveupdate/luo_file.c +++ b/kernel/liveupdate/luo_file.c @@ -385,10 +385,11 @@ void luo_file_unpreserve_files(struct luo_file_set *f= ile_set) args.private_data =3D luo_file->private_data; luo_file->fh->ops->unpreserve(&args); luo_flb_file_unpreserve(luo_file->fh); - module_put(luo_file->fh->ops->owner); =20 xa_erase(&luo_preserved_files, luo_get_id(luo_file->fh, luo_file->file)); + module_put(luo_file->fh->ops->owner); + list_del(&luo_file->list); file_set->count--; =20 @@ -677,7 +678,6 @@ static void luo_file_finish_one(struct luo_file_set *fi= le_set, =20 luo_file->fh->ops->finish(&args); luo_flb_file_finish(luo_file->fh); - module_put(luo_file->fh->ops->owner); } =20 /** @@ -738,6 +738,7 @@ int luo_file_finish(struct luo_file_set *file_set) luo_get_id(luo_file->fh, luo_file->file)); fput(luo_file->file); } + module_put(luo_file->fh->ops->owner); list_del(&luo_file->list); file_set->count--; mutex_destroy(&luo_file->mutex); --=20 2.53.0 From nobody Mon May 25 06:43:16 2026 Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8BA03F507 for ; Sun, 17 May 2026 19:27:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779046023; cv=none; b=XlnuddbR/0npDeH+/HlVAnDq3T3jHeVZwp5V2YVyzicMDbvOWeaSMHkDQz4V2HDff011ANSy2gzd/+8ga9UX46F33t+RrpVwCJg7gXpewNx1dfcCqj5UVNdhPaNopy6XBadl/b7zcFM9BTR4X2BpZMe2LpoEkzPF74GTi9AeYbc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779046023; c=relaxed/simple; bh=V0WUQPaDjo3MdPHK5/s7xd85m5/FYQDxZxhE73n3PRY=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=P9aTmHWLaKi40EXo5Lu6+1da+x7Ecv9kWRGECWyGTGt8bNrFVIf/kgVRW7aPDHdTHWld7qdXXBeKGD/pvDMMPeLZQpOnlUPABTENKRocvBmiM6TogVhx7UEZY6FAvRuh1kTcJEhyNEDdnhidVzMRcNqDRitPSNG3S4x7dHKhK2g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=soleen.com; spf=pass smtp.mailfrom=soleen.com; dkim=pass (2048-bit key) header.d=soleen.com header.i=@soleen.com header.b=WDtY/P5A; arc=none smtp.client-ip=209.85.160.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=soleen.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=soleen.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=soleen.com header.i=@soleen.com header.b="WDtY/P5A" Received: by mail-qt1-f170.google.com with SMTP id d75a77b69052e-50d7c12e48eso18718231cf.1 for ; Sun, 17 May 2026 12:27:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1779046022; x=1779650822; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=BlG8LpAFp+hKa95DX8x1G7ey+RY4RgJIzHYj7htm+bo=; b=WDtY/P5AVcL/1N3R46pmV5leEvVTyC2+4HSzKJ8jnftUW15m6t6pV55YMbP1dbMsx7 PNGCp9gUrzv1aiPHslwvseCGmawPf2DgcnZeL9ms3tlqYNPS0dHcEa8OktaebQXIZviL FjkiRhGzz0ieACTdNps8avDIRx/IpC9HdM53tnxpQ+GBxbCV3oRVYZZJ8VOPrBYgDmNB gWVmYCiDppFjB5A7Lf+wPoERm3mB0iDdkkByNyFlHUwqeewjjskO3VayVt/W3dIooC/L Y8tDKGHvaQHkO77k9JnqWvfwZkE/TK1i1SroRpx0g3giL3HscbNQ0US3E9O9do+iQpse 6dwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779046022; x=1779650822; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=BlG8LpAFp+hKa95DX8x1G7ey+RY4RgJIzHYj7htm+bo=; b=SKESPNMALGW5fugLZuHyx1nYYm8NdlHP5P1tLNoqblE0+U2iLwKhuSi538kTziPHiu jM03r7wZ/I9aBEldupTYmUMJv9paZu7TGsVR6RGTOo/L3UwfINxQHiEp42k6W4lMqMii PHvrSsM4XcSfS8JIqGE6jnzyjwzZtAXqbkl+7rsjNkk2LThTV7cevEfHNx/RpmHQ7m9D mE8cNZtNUnVpFqd3n2GhFxFX+UZLe+3sfvLeYtG0n2gL2Uz3lPlp/tS/Y8bRRx9NpksS 8Tq9hgZnA7HacV84ZB5kg9EXBm4yM2ociq3BoUbX9A4DmxwViH58RF4KTlhBUj5RFeC3 0bqA== X-Forwarded-Encrypted: i=1; AFNElJ+4Kt91B7vtkQs0MpaTXN38SHPecILf1hr/SHVv7cDwgfBfIASfhkH3HdWtRoXltq2tX+RjAX9ZmSHbKg0=@vger.kernel.org X-Gm-Message-State: AOJu0YzAk7Sng/9ghnnbo/n6zLfP+9uxQ7IuD2/eXckDrDxJstzeHAnt tm07zYUS4k9/NE86eAc5BN+x5Q3+RmozkpU0XAbK1uk9MUVtFBlrxN+ZvOlg4l0USD8= X-Gm-Gg: Acq92OFEfOerJvbOwNG/VmS3l/Yq+n88k2k1VK6RXSMpbr1IbJZpOW9A9Rd1Sp/S4eo sLrw3v3USd1yUowilwu9YI5s+w+DzYs5c3OIzk19A2WdRfXmd7rg/vyIpJC/zAFaqcOw6xhIx/A qD8S8OVK1tJwCIHcB8wMA3npgfN6mXo3PFJPIHmThJa7YPni6rnKehmXqGcrsdD9v3rtqG+nw9/ Mc2qONVPCeYmQ7shTeVLY0+weLP3iZxN8ELNDxh1lpEkqqHvNmxMfIeXB2Zs+M/1J/w1QPoZwFS QV4EXM9VQX0wfxZq1SyBZAZdkaWBskS4J1V1kFZ2R6sUKraJWM6WsRIpIDH97mo/53hgT2NbNan qdw+NqVspUOe6mYrZDc6A3iejXCUWz5rTTnuqJxeos8kpyEWnaMJpGvN2MBtn+wCWMg07L1meC3 V4yhX0tHY7GkRDknC/jI9XOEbnkb6/o4GUFg62zSGPGtXedyjjObs= X-Received: by 2002:ac8:5e4e:0:b0:50f:ba60:2dd4 with SMTP id d75a77b69052e-516419629f0mr204707541cf.40.1779046021672; Sun, 17 May 2026 12:27:01 -0700 (PDT) Received: from plex ([71.181.43.54]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-516456d5c4dsm108828621cf.12.2026.05.17.12.27.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2026 12:27:01 -0700 (PDT) From: Pasha Tatashin To: rppt@kernel.org, sourabhjain@linux.ibm.com, jbouron@amazon.com, akpm@linux-foundation.org, bhe@redhat.com, linux-kernel@vger.kernel.org, dan.carpenter@linaro.org, liaoyuanhong@vivo.com, pasha.tatashin@soleen.com, rafael.j.wysocki@intel.com, piliu@redhat.com, kexec@lists.infradead.org, pratyush@kernel.org, skhawaja@google.com, graf@amazon.com, mario.limonciello@amd.com Subject: [PATCH v4 5/5] liveupdate: Remove unused ser field from struct luo_session Date: Sun, 17 May 2026 19:26:50 +0000 Message-ID: <20260517192650.1019314-6-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260517192650.1019314-1-pasha.tatashin@soleen.com> References: <20260517192650.1019314-1-pasha.tatashin@soleen.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The ser field in struct luo_session was intended to point to the serialized data for a session, but it was never actually utilized in the implementation. All serialization and deserialization logic consistently uses the pointers maintained in struct luo_session_header. Remove the dead field to clean up the structure. Signed-off-by: Pasha Tatashin Acked-by: Mike Rapoport (Microsoft) --- kernel/liveupdate/luo_internal.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/liveupdate/luo_internal.h b/kernel/liveupdate/luo_inter= nal.h index 875844d7a41d..dd53d4a7277e 100644 --- a/kernel/liveupdate/luo_internal.h +++ b/kernel/liveupdate/luo_internal.h @@ -59,7 +59,6 @@ struct luo_file_set { * struct luo_session - Represents an active or incoming Live Update sessi= on. * @name: A unique name for this session, used for identification and * retrieval. - * @ser: Pointer to the serialized data for this session. * @list: A list_head member used to link this session into a global= list * of either outgoing (to be preserved) or incoming (restored= from * previous kernel) sessions. @@ -70,7 +69,6 @@ struct luo_file_set { */ struct luo_session { char name[LIVEUPDATE_SESSION_NAME_LENGTH]; - struct luo_session_ser *ser; struct list_head list; bool retrieved; struct luo_file_set file_set; --=20 2.53.0