From nobody Mon May 25 05:14:21 2026 Received: from mail-qv1-f43.google.com (mail-qv1-f43.google.com [209.85.219.43]) (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 E2B863F0AB2 for ; Mon, 18 May 2026 12:55:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779108905; cv=none; b=dxqA1ZbPIFRqhyeojX1S/cZnzZcJl7qRxAGP7AAd+HW2gXAvC/0IJ4VE/8PCpCr5X+dgevml/UTpKgEiHCGu3s1jgb29vsQ3PZ539JE2/QkLMr6fYDUkzkBsK56xh3pz6mOZVLFqUQ4Yuqemk8UQbRYbRjduWrVulYmhP9K0o7c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779108905; c=relaxed/simple; bh=ThOZWVeSbIjBKd+GRVf3JGXkhhtQKRBs98xF6IKP0Pc=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LjyVj/gtTDbOh3HOA3DM7GW+LT9OW+WRtfYzugKdOSc6egfAV32HAtjjb7GHXRUiMTEoIFoNN2CgBlMkdB01mlU5YRzGur++WTT1R6jk9RV4sTDdPRKnJrlZ0LDxNzmQUEH2GgcbdDlHfY0J5U4iTmwK5uYKHKBRQ5cjs/vY0Ss= 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=Y45513W1; arc=none smtp.client-ip=209.85.219.43 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="Y45513W1" Received: by mail-qv1-f43.google.com with SMTP id 6a1803df08f44-8b98482b253so41944726d6.1 for ; Mon, 18 May 2026 05:55:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1779108903; x=1779713703; 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=HZBWzBJ7tcP2BdZJjyaMfbgUmI299X9kvwn5AEgOwKY=; b=Y45513W1W2PteJBZFeyofnhNedr2YFhr+Nn97ZrSsFN4VWY0YeWsF4zagw/tj0zWEN TUH+TEFvb2rYbhEoZD4ldTd1ACHPRS/AFQtNfIcEWuTb0AGigaKuPYQZJEOHICupWhEN d7KKCkUeOu7bFMwhi2WguY1sUKYUU18wKHZ4tqzBnfnL5EBJPVynsGLxVrZ0WN5LiGs0 hrdq/3dNrYTSyPsiD94R8XtazO5MZ3oml1rj6uXPuUqV3/C8nMk6+soIW4YgUx7eM0UA MEeDKi8hT9jO0oFbfO1wijLxVV+OSXGsdNFBrSD1N6ZiYqeVKpnjK0Sxdcnk9IUG1/lm 66CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779108903; x=1779713703; 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=HZBWzBJ7tcP2BdZJjyaMfbgUmI299X9kvwn5AEgOwKY=; b=Y9sClDHlcWv44cF4tYYlRK66uUkusLTC5NXrPk3AuryfNMxeObSL/HgLQjI8amu1R6 twMe284plWzzq5V54L4nTiJlYwfkImebXaN+RPma7gKGWXS8DAgVTB+YB64ba/PlmINa g/U5qgCPRAjtJ0hdWrWoWuiCQT3oMyMzxjHEsWRqIRvh5AO5YmdthkuCJO352OWx4mLk 54m+kVjMRzMCO/30LgsTeiQCYdXc7ZSi7fzlHb4SBWgu/ZmpLS5JdQ2XdkcAvq3tsXqD hdw545BYZNBSP6iJtuDrbSKPvNHx6vGbSMlnU9sGrPUlCg8zeQlB8g4UKnR+ZmHWZTdn ckVA== X-Forwarded-Encrypted: i=1; AFNElJ+idexxZopJTZO5kYzJOpHAeosad4E4wIyYY13y1Y2/4GkZDzKBUCnOUOF+OvYU2WzZ+nFzGmBFZ/JAmao=@vger.kernel.org X-Gm-Message-State: AOJu0YyNz8bTDe5kPQgS+yf/j6wmz1966e7oa/p61XmzsHECVUhYasSw a4UufapLvGJK5xAFAaIr96BSjaO2PkG7Po0XHeDxLw0bl/7W/aWL+q/vKcn2yNbxuNw= X-Gm-Gg: Acq92OHq0Q7Gmkzd8TAtIEAuCsbtmOcoDzNLKKqpuZkHnF7RBloeDFqiAJgeUAhN6rC 8swCNVinRAMiy9h3jFWMMCLT2G0XtCNZjGvocePC52k+H9VRXvHgw294LtiS519R4R4tNbjGLl7 Ef9R1nBqpiC070nj/eKNJLyfnkFyjZD7TWELYfhH2y98qpUpRUBdqzth/K8c8L/2CFDuIquWi8v jHBFqZHfLzui+4ZnZz7T6nDvaeV2ZyUHC22H5xkQFfShmCL0D81oR1hes9R+JkcXESeQ9nW7p1X vu6EvG9lkw44SKm8OrBR7DnzltiT5XRxnn9vOGlcLhcabHgmH+7OzVl1WNXSUTljjy9U0TeNTrz 3XaGGYBwdCYsgPImNlmG4qg48QYTLp9ePTHwyqoYyR1x2xiAqKVUWmXXjLbHQHvxDJAKjCb6OuH Bwolhz2aXOcmLuWqKDEPtqzc59cthI+py/CFLnV9KtCPFLVu9Ps8S9Js1dndVHdw== X-Received: by 2002:a05:6214:5406:b0:8ca:2a4f:7364 with SMTP id 6a1803df08f44-8ca2a4f74c4mr147898426d6.29.1779108902898; Mon, 18 May 2026 05:55:02 -0700 (PDT) Received: from plex ([71.181.43.54]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8ca3608c1desm54511756d6.2.2026.05.18.05.55.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2026 05:55:02 -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, 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 v5 1/5] liveupdate: skip serialization for context-preserving kexec Date: Mon, 18 May 2026 12:54:55 +0000 Message-ID: <20260518125459.1092373-2-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260518125459.1092373-1-pasha.tatashin@soleen.com> References: <20260518125459.1092373-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) Acked-by: Mike Rapoport (Microsoft) Signed-off-by: Pasha Tatashin --- 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 05:14:21 2026 Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50]) (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 D5B28451069 for ; Mon, 18 May 2026 12:55:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779108907; cv=none; b=ETJN0T0akBsWXyJcsNTnxnRcja8AM873l4tlWXCDpDKE2kLFmXHR6zWiLUZcS+nbRT85Oap7EKpiAdy0LbBXcc8dcj2BWc18j3l6bYtTqTRfD80/9XtCnSlr9/Ijye2L5/59wOCbfurjA/FfjkMUcUMqvxYO3O1VHd9VRcVRa90= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779108907; c=relaxed/simple; bh=dxkjS0HR50iUX+ztoFrBXXibHV8dxd0U2t6KOSUuIYU=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=f9SMraPZVBgHKgE+F3X28qkOGP0yhAhbf2V20083IiQ54Nfowsj+1CtORzBJbNhbZFuy6kRCfuPAxroA0iJm4lU0yzh2xxlTjobE59jBj7r4poaPlATOFm0/sL/jxukI66FzqEUWTC6ivHE4GJlkVVWKJ4ZIc2VFbd9uQOcaZB4= 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=N0IuktyJ; arc=none smtp.client-ip=209.85.219.50 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="N0IuktyJ" Received: by mail-qv1-f50.google.com with SMTP id 6a1803df08f44-8acae26e564so31393856d6.2 for ; Mon, 18 May 2026 05:55:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1779108905; x=1779713705; 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=HTwV3krVMC166ptArXz7vUwnLCTb4D391nKOdGZOpkw=; b=N0IuktyJopmUQG5CgEUgyfLtVmk/k39chUF/DOaiCPuvL+Rkv8nK6cZG2PN8Gfcyz2 CmaRdFuORh+U7YQQ+zTa7DM4hoFrC3cleGKvZH6cEgagy6WYm+wnZzb0X7EPn8A45POK jisH3bYqyCAa3DOt5R78kXRjwBJ2PaO3vHWJLxTueQxnh3ZrL1XfBJRAz4EOqcaZrOsG OGeJlcWcXyplHU0xoRcaPtGO8uofjFz0hnnk3suU1vOtKmEpCEGovrR/iuhK6hZ+eKQU tTfXckjUqbE1dO7R/QfH1C64+SwqAup/otInxM3tOsSeydQX446e/ZlleCB0inQMNDTc gICQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779108905; x=1779713705; 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=HTwV3krVMC166ptArXz7vUwnLCTb4D391nKOdGZOpkw=; b=pea5gh0rrKgtBlu6ozHF8YUZ2H5eRMWxgaWxBuqbVlce+tJ7MovcuCgST4badvRS8K qwEaZoLCpck59+CMq8lLSD8njimilymXGAwV7KkN7Vv2NHSG0iE4dJ+YdXV7+wEsxJWc VODLM+GaN1pk8ORlcGd0UwKAFLa4UtgUL5sC+DxVmj0V0QswN5nKsCOsmQ7jbZ6YBgbS HX+YaxI8a2B3OifudGq8zL7F72Vr0uT5ikeH2zlTj1LNK97DY0QCYZboQdUkFp8Teez8 AbSs3qWWWmoZGroy9RK9gbvV4P1yiyiXhGq7yeJuHd+rjaSD+ORRUozKzh+GbAGzs9d0 A+LA== X-Forwarded-Encrypted: i=1; AFNElJ8uwxaUkUJhO7tXAVvwl023dDyADoQ4O44xmbaolxpCHQ7VTKcf3qzJQ9wbHsJ+vrcCiNi9WzVuhNM9JX8=@vger.kernel.org X-Gm-Message-State: AOJu0YxejnjGkFJ4vYEtM6yxAY7lBtHerJyl5cTvcmd/YsOCa6pXJm/u MJIc4UNVauLht8A0da+shdb0Yeu6uGfVQgsS6RAHR6kSkUUtq1iFop9Tz9AImLWpxNY= X-Gm-Gg: Acq92OFvwKPi98m/le4PlDqC2OUNM1y9qfFHxgaQecqu4kAsgjAEbTG0lyJ4M4p8RD7 m1tBV+vbq+JjDho3MbYRIff+bSWwtqEu/hOcdouTKLekXnqOJfRI2+GuHOJtCs4aCIgfRiI+zCm rBHbn9KP8Rz6I00UYutDwF+dgnejvek6ClLl+o40mWWFXBOibKP6SLsw3/gCDC+jgXHP3INmICk JemAVi/AfxUULraT9C4dMpH6GdPd1KE39H7iGxCaw0cdOTy02+PZBHR28YVBbgKukYV2Jh1NjRJ pzzs2SxJhst98TnSsEo23/hcTPfsLCHtkJR9Kgxyfmivvk++1IrP+mU/hWBlHVHi5WUEeNNvl0S 6CAlG3DdZ0NbuckaK9MCkF74DtAnggMRdLKCe5EwNTnZAQIRVZspHeRta6Ktg3ZkxQDRTNuFHLl G62RBL/Bt2xPuI+XSK34D0YpgvKU/YAh7g+ybIB3yVvjUyPU+L9S4= X-Received: by 2002:a05:6214:da1:b0:8ba:b3b3:971 with SMTP id 6a1803df08f44-8ca0f687df2mr251833076d6.32.1779108904519; Mon, 18 May 2026 05:55:04 -0700 (PDT) Received: from plex ([71.181.43.54]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8ca3608c1desm54511756d6.2.2026.05.18.05.55.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2026 05:55:03 -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, 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 v5 2/5] liveupdate: fix TOCTOU race in luo_session_retrieve() Date: Mon, 18 May 2026 12:54:56 +0000 Message-ID: <20260518125459.1092373-3-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260518125459.1092373-1-pasha.tatashin@soleen.com> References: <20260518125459.1092373-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") Acked-by: Mike Rapoport (Microsoft) Signed-off-by: Pasha Tatashin Reviewed-by: Pratyush Yadav (Google) --- 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 05:14:21 2026 Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) (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 EEFBF4534B2 for ; Mon, 18 May 2026 12:55:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779108908; cv=none; b=CbgVaFcnhodZ9zzJU8j0T2RFDjo1qRvMB0Z0LKClkOYYQHZpwWVT4bYAbsHmS04ULRw1z20Cf1XAhoZPC5zDY92W+fzYZiz5rZ5cdXYWF8IzKx974IA29iG71keBsueUdIw70up2omKHRoblMiUKv7CuVLzTaU2IqEiW5/74x1Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779108908; c=relaxed/simple; bh=0UU3SSxkNt0oFr3OAQXPmPVT1MJrgVRIQpOfm5tfQ3s=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tlH8bc7eu0l0WCmCXZFOuDPa9gDtTSnBXAbs4YK1zxDjhRbMxS8T7X8QEQsP5C2n0Q92b03KRwnPfG8v5O6JyNG3kuQ1qifusJlpKwLcoQlCR0RTP3KyuIRNhvWrSjOpjZE1n53i63Orx1igeGJD92BUa1rj2N0dCiSYdYVq/bU= 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=eFNl2S25; arc=none smtp.client-ip=209.85.222.172 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="eFNl2S25" Received: by mail-qk1-f172.google.com with SMTP id af79cd13be357-913cc4d7c71so170852285a.2 for ; Mon, 18 May 2026 05:55:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1779108906; x=1779713706; 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=SjCAR24a3aXEcLHVCaUoQg6OsgL27BMZ1Zf8TbpqV0k=; b=eFNl2S251z7n61/gDX2/S9xpsOqhY6QrBH57j/Zc+4W2DKzhuDMzxhlf9gR3vAXdIj vQHO1179qMu3XbXZ2A8NIa8rlHQe5kOEzKHGN839AEOMNnjQgButsf0P4QRrjkaZJclw q30Si84yuGh7AeguqByW55tdBOWCdTaLY1Rk8hPyGtzyDXw86jhsQ0WPUADpJlpXb9bm jYd6p2/3n+4X+mavDVmxN6mp1ovB2j8mSK+zgc8hflhW3vVvs4ws8jWlpZLnZZmr0yuR T+EK6/xRLXxJLCPY3sCp7tug12CeuBQw7KAy8AEhuEEjpyb8IB4Q5GhRieQVDaYX6Efe bCFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779108906; x=1779713706; 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=SjCAR24a3aXEcLHVCaUoQg6OsgL27BMZ1Zf8TbpqV0k=; b=st7/ttYJ+//fHSmAGH3R0Do1837X1enL7+VrzgmahZ6KnRxU1sx8hMjwRVVAimraom 0SoztACmlesCAEdZkFiG1gYxxq04ehUMx4FDu1GjO7KfNJNFox5Y6RCRrwRrsa17OdVT ZevS+brO50Ya+DLKZ/RleTM3FwNjRhMHJRSV7A7umhWJZw3qCIeuSdYhVB4mZEcz9ffX V9gSlWhRCzwKOIK+tmA3d7ePY2mPs3C8U2AhOwBV9UBUQ/T0iqC4GIivZvlkHG4YAxSF g2lxhGZGRxbzApQZ3BPcT4NCVxOV6RGH/QKpp9m5vIMbmkvgLip/ja0mEl5aGP/3RMjg ajHQ== X-Forwarded-Encrypted: i=1; AFNElJ8rv3sejBMpPKZe5LyMiXeAq99VxMBj0q5IfgcKdwnSSsCQujNOOiBlQKwNVnKeQl4+qSY1RgOITsnMKcs=@vger.kernel.org X-Gm-Message-State: AOJu0YyS6K5UIFkC37qIw7XI7w53VcCHylna17R9K9ip4cgb26nLfUzc ePM0O5C8ATrKRm4+BkTZqFAA20G1eGajYF0bb/14YafJ33St7yR6aNg7s8wlUKDvdYw= X-Gm-Gg: Acq92OHvOB/a6jPchUI5uNxgA52h9TcA9kCk/q8WsiWJkDa95NRIbkITUre34WoQjCR P4Z9n88BT/R4rGE/f6/IBOnV3y9FKvmwvUQ4J06qRalY8gbWZ+llL82Za/CDGub8s3dJLsk5ZrQ gsXeWWDsbFHPyqRnsdL8HfyrM1hmL1MIrqpVzUA6DUyBGR3HYL6JLsQSXPqvoBoSadHNa5BC/zp nWoShhDjvTrLyJFtToYEjYTxV3cqByGUUv96Q//UagAEIO8VvOMw+PbKIFQQrsP0D7aH+w/l0ct T2zeIpuvr2QrLX71f1GyjormxT9kE+jHpsI8NJmBtckFKC0kl17W1WBacof0/C4Km+DHZTnxBJZ NUSILX5NmnUltlbqzXLlE3kJg2oVcJvRo7Jpb56G1GH0+SapaeN5OneDbMg052XcsQ4K1pBmaip MllnBBnwLi/+BrkcRGXd3KIB2W7EKe4Lzh4xoDQMJDNS7OjAolu66XKezdF7Ip5A== X-Received: by 2002:a0c:f109:0:b0:89c:4f67:8d17 with SMTP id 6a1803df08f44-8ca0f5c46ddmr189867536d6.8.1779108905929; Mon, 18 May 2026 05:55:05 -0700 (PDT) Received: from plex ([71.181.43.54]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8ca3608c1desm54511756d6.2.2026.05.18.05.55.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2026 05:55:05 -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, 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 v5 3/5] liveupdate: block session mutations during reboot Date: Mon, 18 May 2026 12:54:57 +0000 Message-ID: <20260518125459.1092373-4-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260518125459.1092373-1-pasha.tatashin@soleen.com> References: <20260518125459.1092373-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 Acked-by: Mike Rapoport (Microsoft) Signed-off-by: Pasha Tatashin --- kernel/liveupdate/luo_session.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/kernel/liveupdate/luo_session.c b/kernel/liveupdate/luo_sessio= n.c index 59b37d17db6b..812f09152ec1 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 @@ -389,14 +398,17 @@ int luo_session_create(const char *name, struct file = **filep) if (IS_ERR(session)) return PTR_ERR(session); =20 + down_read(&luo_session_serialize_rwsem); err =3D luo_session_insert(&luo_session_global.outgoing, session); if (err) goto err_free; =20 - scoped_guard(mutex, &session->mutex) - err =3D luo_session_getfile(session, filep); + mutex_lock(&session->mutex); + err =3D luo_session_getfile(session, filep); + mutex_unlock(&session->mutex); if (err) goto err_remove; + up_read(&luo_session_serialize_rwsem); =20 return 0; =20 @@ -404,6 +416,7 @@ int luo_session_create(const char *name, struct file **= filep) luo_session_remove(&luo_session_global.outgoing, session); err_free: luo_session_free(session); + up_read(&luo_session_serialize_rwsem); =20 return err; } @@ -415,6 +428,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 +596,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 +608,7 @@ int luo_session_serialize(void) i++; } sh->header_ser->count =3D sh->count; + up_write(&sh->rwsem); =20 return 0; =20 @@ -602,6 +618,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 05:14:21 2026 Received: from mail-qv1-f48.google.com (mail-qv1-f48.google.com [209.85.219.48]) (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 8C7AE4611C6 for ; Mon, 18 May 2026 12:55:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779108909; cv=none; b=NFw4iV6Rfo1QSSbGursQGdbi1hygiAoy9+JKjrDgyBRGY6aY1DI6K5InZa75FQGM3roCqd9GiUOHzZNdvY5cliG6ECRuuFerxZGF0RAZfltsofQZVcQbiCUET0Y9NBAvYU0fwNcHkzoopHsZ59lTDGm9McHVewQgJeJEzNfBNS4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779108909; c=relaxed/simple; bh=Mi40fHPhIvoD7xqu9Vipb9tn7MRW9Oe+uMgC4Nu7TLQ=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=c3mUmlB1rMJ1bpfaVBluDECDQrfkhjhpooZnt7h3iCRJYNtgR/NcCHFmn3JoV2ynE+7nyDxfc8PjKsU7NzfZBq7y6D2Q906Kis8MKmfsj88TWyStRYfoqvYOsWobgiFIk9SHCaNSRDuuQMi7DB/JggCcEoG/Z2GU4TUzbdicJf0= 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=hHOaMBuW; arc=none smtp.client-ip=209.85.219.48 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="hHOaMBuW" Received: by mail-qv1-f48.google.com with SMTP id 6a1803df08f44-8b74b460d77so32437826d6.3 for ; Mon, 18 May 2026 05:55:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1779108907; x=1779713707; 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=FzXio5kQHzeVIOhB/pKbYB/Pwfwt4Oy892xKhUGnkRQ=; b=hHOaMBuW6Jun4NGwc0h6XACrxy8IFrNKZIdn3Bb2DJ5uxaVnY7qyuoIdQQhupzz3tg 0GtJl/+HOIYQNTdTaNMV9SMg3RSf00zhet4sq/LQJ583KzW1RSGNqrdPqeCQUfttvbBP O7c874Hx+OIuTapB75KNJJBpjhHWQpikW6aWEtK/l2rgu5jkt7zMCR5d+ursZftDzChO NC4HLuBv3KLUA9nE9+1FE4m5mZvrSjf5NR+3w+wBOWtJmMiQMx0KeeUf0ISbHc6Jb5Ii nHKnnAHoBcn0juHolun1ObNyBEmTwphQF7NbAiAQwCz7+gb4veKDUribdGlLrlbmMZHl Q4xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779108907; x=1779713707; 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=FzXio5kQHzeVIOhB/pKbYB/Pwfwt4Oy892xKhUGnkRQ=; b=TATIsUwh6hIk/cNZnKqWi54NDtoTMsSOHWnteVf+Sud7uLFRwaEk7A97IvcBSnBut3 /OSG2Hr4xigNcdwWjUN3WqxWhVpMKWY+1RLk4ua/aHDiZEBqCcrSlnVbp283XlyEE6a2 X2K3ZpTe6R5VYbQQHaENu6iDdOtQbI/eULH5Poe7HSm04TNaG39FvNUs/esMhnR7yJZE 7+z2cDfphNcwKHoS2C7p3o9VYgkD4LicOwPHq5+vSX8ZE5p1jhCm/SBlbfLnsKY+SMTx gJiEcBsLYbOQNCnn5bStpC88TANi+zDp0/c253cLmdaTAKHulx9QDaL6y7tnWhW3BHUi bfBg== X-Forwarded-Encrypted: i=1; AFNElJ8tmGP8pwfeLcI9pVVtoER3Y46YfYtU1bTaAyFc86W9ZtNw2DA13Pk7GQKzLx11f+anTZv8NIA5/IBD3DA=@vger.kernel.org X-Gm-Message-State: AOJu0Yyp4533ogRn7X0C2i6YMpKQfabFAWQjqY9oEaXD111k+tmSfPsZ KIJW6UHZ4qD1eZVTd7P8OnAiXm04pfdqMjFxQy4z5vvRJnAD8JXP61+jFd90csYokHw= X-Gm-Gg: Acq92OH3VEM2Lh7wD1WQJIZPHTDCJWOxVtgzSU1YEXyCsY0HS3tpV6WkbywGmmeEu4H TMYKjbGTuOisG+CXj0mn7+ToJoTeQjR/2YmxjHHwn9/RWhaFbltJyMFOnrD7W8z9DxucY59y1DQ o+j3SiODL0hiOuSsQd0mT8omSKb9/zWr9aYa+ZxjMDLj3Cs2+M1Hb43pt5PdKkmbj1GNptmgqPS GuqoVUQbBlAT3uhXl45p0sULkHviSjl3GtSIG1WEEmZoMU86FLYo6rjH0EAOS5UmHJogktWnvaL yMGt8VQlr1I8HQFjto7DYkHdNu0l1+NTyS9NXO7+UDoBSHBYQ8crbotTCGsoSaNZornbkAvMJi3 MHbik/zr2OfXchPXnMkWTdURhOYo609WusraV2kp1WIJljRGsgdF1hZrJS7F3+hvmgjpXlbjAZF FS10GbDyDtY1wglQmmGJXrv5E1uyJUhZMG0bZ0jB4QK2oDP/O0aqc= X-Received: by 2002:a05:6214:3a83:b0:8ca:ee3:6ea9 with SMTP id 6a1803df08f44-8ca0f6285cemr250260446d6.20.1779108907114; Mon, 18 May 2026 05:55:07 -0700 (PDT) Received: from plex ([71.181.43.54]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8ca3608c1desm54511756d6.2.2026.05.18.05.55.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2026 05:55:06 -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, 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 v5 4/5] liveupdate: fix u-a-f in luo_file_unpreserve_files() and luo_file_finish() Date: Mon, 18 May 2026 12:54:58 +0000 Message-ID: <20260518125459.1092373-5-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260518125459.1092373-1-pasha.tatashin@soleen.com> References: <20260518125459.1092373-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") Acked-by: Mike Rapoport (Microsoft) Signed-off-by: Pasha Tatashin Reviewed-by: Pratyush Yadav (Google) --- 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 05:14:21 2026 Received: from mail-qv1-f48.google.com (mail-qv1-f48.google.com [209.85.219.48]) (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 5F7634611FC for ; Mon, 18 May 2026 12:55:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779108910; cv=none; b=B3vsfjyT1ONRsbVUbIMlK9pz8EJn57RIjQGrBKm2xoPyWnZx2fjtbZ22xRLKWioeI5pGKA7KGfZW4b+1t236pRGYC+SgTT9adPUGgxUYSMNgtG69VKQxsoKMuXRk1AZ1G48bd52HDUqhR2tYl8u8q4JmR53r8TY27Jn/chghv64= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779108910; c=relaxed/simple; bh=tD/TV0TPp7SQmnkDgD/q1305UcErkKnAo+o+KZSJ73Y=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YnqDtGIG48QepArhdPU2AgKeeZXukj5OLwa15yQoDhi2pM6RnlWfWUP9K3qeIM1AQW5c2oJ8JaUjWU/e8aSFcrSSdXXrhSa9VqRfb9+hxUh1e/2IiWZQubAUEZ+A8noyaZLNcaAzd72qngsZz2O7bRKQuZfeaeOe+DomT8dCLm4= 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=GAooGWQd; arc=none smtp.client-ip=209.85.219.48 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="GAooGWQd" Received: by mail-qv1-f48.google.com with SMTP id 6a1803df08f44-8acb09ddbf6so47774256d6.2 for ; Mon, 18 May 2026 05:55:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1779108908; x=1779713708; 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=dRrqC16L/kKiIkGaL/cKBFQ/71JkkFCJM96Mq+OGi8Q=; b=GAooGWQdQUoGsLosUyGkU4QZyhgtSyhDbnLsqiVuQY+DcTRrhC7ZJk91rTdWH39a2G GNdzDfM0X/zziasOEAsutSqlWN6sohc3XOoaUKq8XJkvQ9GHKTMSrzepvAoq6R2sMYpf snm/evxb5sepZSX4dM1y0/HDE3V446vBOjItzbYsd41zscAlImwSi6EgMY9IPittUoVZ AluyUUW0605v9guJyZrNXZLE5MAYjIK1IbN6zSoty+qAkwiQ+M9SPGOL3rOwkauNpMH9 A34pz4p3TdBKZ7fuGv10bksXXJoeMTsOu09QkcX8fma2uRx0HDZ6teIK/ao83oEQ4EE3 aJWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779108908; x=1779713708; 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=dRrqC16L/kKiIkGaL/cKBFQ/71JkkFCJM96Mq+OGi8Q=; b=Kz6NG4Sr+Dvd4wcBPwxtWHM8nzZzZ0FrXm+ahy6x/Bl6KPc8k+rVolDk2V2CHuVELV j3Dc1fQI8yN1JIC8JZptH+8cKbIXF8kQwRNcMCpYcggP3tbKakB7Rpaybs5/WSoUEUbd MikoUy3AtqI3uzJIBlzYNDfnrbAH+CHC88YS0ZpXhEMDHu7Nn848Ba7e6/0hCzk4ezLB 9Qfe3GyM0LT4VRnDC8860NpB0ak5L+qJwIq6XWRRG93wFijPHJ/vE1jyRkln8YcbOGp+ vi7DXIqp2uyH9Qd2aH0a6KNY4tCxmq3kCx8pgzEDGg9GAQgPqHPou3dfMQDCzqyuu89K jJmw== X-Forwarded-Encrypted: i=1; AFNElJ+qtA+F0lAmOfdv+KMIVKOTM5hAwT9NpAxpjGBYcul+kwDm11xAYj7+ctdV0uGGft3yP/QImjALwIaWxM4=@vger.kernel.org X-Gm-Message-State: AOJu0YxUHfy3hq2/ZWz70VAZnwfozn1I0GNTuL0RyQMVVquv1G+C4YqA xSIpMcwauGgUBRBEwUhG8UxJm9wmHRYGwKRymxwjfsxWNsz1KxcPu93/B/jdzp45tdQ= X-Gm-Gg: Acq92OGOw+SNTn95wLW9AevYbUOX2ujFuylDRF+mZfAhhcbnF1yym//DWHK03e37Xtm HNov2aGVaZG43AIMs6gSi2q0P5ZtjyV7AAlWd9QmVT9X76Zz79KW7lqB/RjEcOoqTGy1+iemjiB lGJthWqIHzBjgBnT2c+pLy2IzO0+4AO/myfjeP3oj015/5i1J/WfmEBoVp6jTuwBLxFtjb7oSsM vgUWoYwsjXNDCp+sYW+6qAhk2kGVzNPfO9kx6DXzrPLktoBXp7JRKwmRL/1lob/3VONcEcsrEvK 3tn0OQ81w1drIdwyjW5fKQzjoLPgsdzFLpkLNohsjvrFVhWTGcocNPS5unaQdpagZyoEnhQDN9o SPKxxGARvha45EfBqzS7uhYzx0mFciPBSrvk7VpLEAspaFur/YsTyZ9I/WGkOVHysIK+2WbwZQQ EcSE8V2E9v+EVJrMTd/kRoEzhLNhZ0nLVB8d3OaW0Vnv2Vlgz1kYe1FK9eG4gKbA== X-Received: by 2002:a05:6214:2a4d:b0:8c6:2245:3f49 with SMTP id 6a1803df08f44-8ca0f6a898cmr245726476d6.32.1779108908391; Mon, 18 May 2026 05:55:08 -0700 (PDT) Received: from plex ([71.181.43.54]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8ca3608c1desm54511756d6.2.2026.05.18.05.55.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2026 05:55:07 -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, 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 v5 5/5] liveupdate: Remove unused ser field from struct luo_session Date: Mon, 18 May 2026 12:54:59 +0000 Message-ID: <20260518125459.1092373-6-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260518125459.1092373-1-pasha.tatashin@soleen.com> References: <20260518125459.1092373-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. Acked-by: Mike Rapoport (Microsoft) Signed-off-by: Pasha Tatashin Reviewed-by: Pratyush Yadav (Google) --- 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