From nobody Fri Jun 12 12:49:00 2026 Received: from mail-qv1-f54.google.com (mail-qv1-f54.google.com [209.85.219.54]) (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 2C20D314A8E for ; Fri, 15 May 2026 00:37:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778805453; cv=none; b=qNMesDdBYlg1/1QK1rKwHiRmMh15PUEGbtQr49XOV8pc+hloDQhmDQGfVCaV2tAkH5p0N923RsOx1Hm7i8krSWn7tya+gy57O6CkqTNGOJ/t3KX0fxrcqYKedeOHJe4CA2XTh7e9d/sGy5tyOv1oYjVljb6/M3xfQOiSOyNNDHg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778805453; c=relaxed/simple; bh=pLvQu9jsNztI8U/cRJwRQ1VYDE5qRkJfV4sAFyvwGFs=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YUaN7UbCKXdAG9hz/i85JQpZnz/Vld5wkbT6i95+mEsiMqrkxH2l86dGn3V3pkXWpZVye+af0/ftcUUIdAllL6r6GhgyIOufOfrldBNsl3+pTevfKu74WuVwJ1MRwHJHn6OXhg2yum9hGchQ0sJs3PxXeS7DZAAjV78YsgKY6u4= 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=lM49xPe/; arc=none smtp.client-ip=209.85.219.54 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="lM49xPe/" Received: by mail-qv1-f54.google.com with SMTP id 6a1803df08f44-8acb856a674so5513816d6.0 for ; Thu, 14 May 2026 17:37:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1778805446; x=1779410246; 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=lM49xPe/sgW1yBYpA2dF8kAvoPY/DLCqFoGVlHV/hOMwMTNUrde3JytOrYbKUSdYFd wOCMXdMfaD7Sn6XEByz1xpW6WCtERZW2c+YbszBXZFnKP/t5S68ZzWhOpUlyCeMPN502 nBHSQvL4eV6a66N2pjlyxVdjuFG780l7fIgq1e4WmN1j9sxC4fHSDEh7661YpdnlbdIm 6E2UeOu22zfVPU1QU5/vONdInCOHMVonwJdK/Oaxwb/m0FzHIfR0LLwdxvM8Sc5GJDvk jsCBkRzl01e41rs+L2KeOzKMZoRiYOe2Pnh4FXuG8ZNyEVHcPayeMCL/DUzsWGovYgwJ XUQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778805446; x=1779410246; 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=ZOmROFqAUTR4fiKgQ+Zv/COtTzhQm2FvFHWSdJe2Vgp7T/jWZj3r30cK/gCOAb7QVz NhjgVvvpiMl7VjdO6cjgFQf9J+de+YEsxgS9yNy8s+LvAjtEZeNYyJ6uYDKrMQE3z1Dm hUx4hFZ/yDJPKtyW6lY+Qh8N0grGJkyQ+ds1nz13+b5SFZZn1uLlukJLqPRJNgOEpVpE PspxEqOAVV4cL4AD0eGIn1KmvajtWULv02O1pXBSwahd6ixL5C6CM3GkBWgH5w/HH7GT qMt3LZHFs2jH+VF3QT+ZYup8rEmbVG4GsnXTU8LNNd5ch1c98zqLo62mZpMX+auMtDfW OCWA== X-Forwarded-Encrypted: i=1; AFNElJ82Ianb0RKhf4pLwZ5Gb3NwOX4LBWEdhqVCcgraiDc8d5TFkhxDD9sY3Ex9oMST2QlLPfI854OIUFvVV/w=@vger.kernel.org X-Gm-Message-State: AOJu0YyYvM2VEdiDSer/xYQo6Zj2Qd+OJ+sxQvwdnr3n83z7du7Lx/oW BtyTpnHkOWRFvOyAV5jzNIOozJ3ZCDI3A/qr3ysmgJotKivUfS12aIvkLp+gBdq1rYQ= X-Gm-Gg: Acq92OHwpWubmq5egLRs9tEVy0elSSHzLzXXTlZbFVGfHJVzu765Jps2bpAqWrcZGV9 9+jIYZYaBGTPCuhGir4FKYv/rZk+TlAVCcFoLJ67vXpcfl1WnmMdvgc0QohfIA8VKnMzY/P9tH/ +wATzi+hoEHUwlzGHBtbABZVy4SHAmdSEfBxtBXtNcEzzW9TG5QdPzqYeDor3H52rwPee0o3NGq 6UotFm/AYeLlEHFOLxi57rPUDK/yvgYHaQsIm5Eq2SZjVzfsaWfaAq0bC30Y+eHgR4bq4LKD/ve uHM8YrLZCmqgL2+iVVhs7LwjUQkURf7/yJMP2dOqJIrg5cfws4sK1F7D+b+Ebzja5OZqo420Qww M3540StaLd4DdLHSLs3TeF67+ID4O9LjGU80ghUB/zXlwzWvMJnvxId0XmPo9VKL7lDfLxcQmtY 2MTu1Ea65rNrq9t8LDd4g3IxtjELorf18YxKOjH1nm+6PwUiBdjmc= X-Received: by 2002:a05:6214:5b88:b0:8ac:b3fe:68c4 with SMTP id 6a1803df08f44-8c8ff636dc2mr94109806d6.36.1778805445660; Thu, 14 May 2026 17:37:25 -0700 (PDT) Received: from plex ([71.181.43.54]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8c90c16366csm36918236d6.40.2026.05.14.17.37.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 May 2026 17:37:25 -0700 (PDT) From: Pasha Tatashin To: kees@kernel.org, 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 v3 1/5] liveupdate: skip serialization for context-preserving kexec Date: Fri, 15 May 2026 00:37:18 +0000 Message-ID: <20260515003722.938123-2-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260515003722.938123-1-pasha.tatashin@soleen.com> References: <20260515003722.938123-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 --- 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 Fri Jun 12 12:49:00 2026 Received: from mail-qv1-f49.google.com (mail-qv1-f49.google.com [209.85.219.49]) (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 B012633A9EB for ; Fri, 15 May 2026 00:37:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778805453; cv=none; b=Yj/A+lkN8IC6hxQkwPMnOePRqABbacC2BwUHIt6imztCxtVaZ3xBYTmHCadYG6nMxwH+MOBw39zpDhJprvBfOloYjYsd1h24qmQmZ29waLsZHQC84swRAxvj0rzANmJY1RFeeHx/W5hxWh3MSYvwW8mTE/g17Hy4YiYdWH6MONU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778805453; c=relaxed/simple; bh=VDOUe0udGdp/BtydhXazJVsLduc/1jLKbmQIBT6tqJc=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nZ1zWvmgVGiO0j3CU8SUZssY0hxWNkvB84ZsDZ0vq5DStYGcYDG//fyG1j7Z99oNusQrLbIaCqtVIqRKgfblVd1BXih2giOcj8lehtSbmcOpXBZOXRW9m7pqvkK+fuZZEavLX+hT9jSALD/UCG9L6ftnkXNthxkpUZKhoNdi3iE= 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=S8sUcLvn; arc=none smtp.client-ip=209.85.219.49 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="S8sUcLvn" Received: by mail-qv1-f49.google.com with SMTP id 6a1803df08f44-8b3fe2f19a4so82192996d6.2 for ; Thu, 14 May 2026 17:37:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1778805448; x=1779410248; 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=3ooju6KHmBOGujIo2QdXWz5njvmf9DOuV9WEiCEZZ98=; b=S8sUcLvn2SDvH4h1DIjaoFZu9JKXHIxuppfdBIMQA9W1Co84OTkiA/7BERtkxDzL+j vOoqejGB103qTqTRxgk2BEedYYM5BjgZaQ7goUweOydfUee/kU4fKr07i2Q089YfiPHB NuN3mZ9M64tfDoshkIOF8dRvnft0Sz/2XzdWrrL5qdVwd2dwPGRzF439o9SRAD8uP9nr dSZChzIOeF+shXdAa8nGSp2b7LTv22UFrjdmG8QMHJUjoPbnMKzlPCbtH38MPBimREWo 1Eh0edC19gGh4MJctMRLQD5FT71gszDwSUKCRFA2JPo6Tqct6l+DdLOpEEM8zrRDLQy0 0vOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778805448; x=1779410248; 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=3ooju6KHmBOGujIo2QdXWz5njvmf9DOuV9WEiCEZZ98=; b=UFBuUDkhyUG4eeZ8Xq3eYez/WluKnFrWaTjnEd/mhR5LpjKWmyU4rRWmdFZkHvgE9Q pizpgR0yMUetvl5R1Zb3JRhxJQhiuGR8HSWGUzkIcXg5OQeeuAe7BQWa+XZ4rwk2rL3S 1HK8MgA2thZe+5m8k2UuvknsLve9g+H4zSvP0PUzOL0Nt7PWOTNoGTpBoSA4qU8VIrjt QBVqbO0/SBzBg7P5yQmVn75z9/xQaYZh+JC/YHz2gcywNCmgIHjuQslYilRRcpnqXnZD M3wZ+sDvppRWMji7IxKswJTq7r9sUD5HcyL5MdWtij8O+++BsRxAAblnpOpxb3SVt1gf vV7g== X-Forwarded-Encrypted: i=1; AFNElJ/neyv9+eUsTIC3eHRzvrCMmkSNOo0TkDhfGg6ZZQJJApS1PpDwafkkvoHOA2H4SlePM1Fl0hNAE/Qr3KI=@vger.kernel.org X-Gm-Message-State: AOJu0YxoKpZsJ0k64edCuZMRBYzmBN8SNhDvPpDhjS2UNZ5/rNLbRaJY i+k/9ZhYPsudshZdR9zK1xsWmJLMZ7Bb2hKDUaDaNUzJn/ncSiRM+aPncChxOaB9kPg= X-Gm-Gg: Acq92OFkoJCvKL80+fkXe1KcA6Q2KPo5Asao1xizYqzeLbzJGMd+cr/7mMO+Lj/lOqu AZcdG1k9ycBiU7yfZtbW/YC2RZBfcLnhQLTX6KUJOAZasdPD5KXlJTt+Qg1TRVg2J+EqWPw9g/l 8X39HtRBzM/CMALmOw5c5H0GY/6MxsAotFcoxTJmsJTcw/ocJR7NHBkKfaREtPjkJqUZ7WrJc35 awdh4YhglBRnP+l/AYAYwJP6yhfWKbmM19ElPkEmejod04mwYWey6skSYT7PRGrKxdw9ysE6qVM llXwWlvSo1gJPT2Xyy0xEu6M4Xn1siDCfznFF52aP683wanG+y+aG0xPhviCOa2F0/jSklH5E1k G7hC5zayR5vMkq/d1rUkKl032MfFOJDqfIuNQ6QRXvMWX9Uf8L8hpQbP12usXUerTz4aMdYKFDu fItwqk4K1iy6w1iDEIghBdX7bXwEewHXWKVt17fFSuL/aKrhEuEXI= X-Received: by 2002:a05:6214:8083:b0:8ae:6587:3d54 with SMTP id 6a1803df08f44-8ca0f69eab2mr32523036d6.26.1778805447605; Thu, 14 May 2026 17:37:27 -0700 (PDT) Received: from plex ([71.181.43.54]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8c90c16366csm36918236d6.40.2026.05.14.17.37.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 May 2026 17:37:26 -0700 (PDT) From: Pasha Tatashin To: kees@kernel.org, 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 v3 2/5] liveupdate: block session mutations during reboot Date: Fri, 15 May 2026 00:37:19 +0000 Message-ID: <20260515003722.938123-3-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260515003722.938123-1-pasha.tatashin@soleen.com> References: <20260515003722.938123-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 --- kernel/liveupdate/luo_session.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/kernel/liveupdate/luo_session.c b/kernel/liveupdate/luo_sessio= n.c index a3327a28fc1f..5aa0011d9643 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,6 +394,7 @@ int luo_session_create(const char *name, struct file **= filep) struct luo_session *session; int err; =20 + guard(rwsem_read)(&luo_session_serialize_rwsem); session =3D luo_session_alloc(name); if (IS_ERR(session)) return PTR_ERR(session); @@ -415,6 +425,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); scoped_guard(rwsem_read, &sh->rwsem) { list_for_each_entry(it, &sh->list, list) { if (!strncmp(it->name, name, sizeof(it->name))) { @@ -583,7 +594,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) @@ -603,6 +615,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 Fri Jun 12 12:49:00 2026 Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com [209.85.160.169]) (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 02F0F33E368 for ; Fri, 15 May 2026 00:37:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.169 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778805457; cv=none; b=N5I4+eu4f/bHqvJE6gsGkmV3XAP19c3mES1jkeC6QukElwo9Glv7Ei1Vm9AADYjVi1fNStLWiEUvZePQG1B2IhKKgg52wOvvjQPNojynLi5r224hsGlg3DhUIOsjEZ51NpM/6HvzBLRyxiPlFOOwB3RKjnenyUkQE4bX7Ah22ak= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778805457; c=relaxed/simple; bh=FxF0D5TfSSjKJUdTNxig64369W3YFxX2otRsijnWFaI=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uvf5/EQxa+BS0v94CqExt97QdgGLajXCbt3hP/y8NYslgcWrH9x9zge+nJ6odSXF9FqOnzqYAnTnoYm7zJwN38586POfFaNpaNtABdrWqrXNh1XRTJ/fw5l25Jl8oo08dqdFUTSx/BshbqvHVUeNgfREPKCXNDWKfBxgzdCX3mE= 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=Gu3u9+Ta; arc=none smtp.client-ip=209.85.160.169 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="Gu3u9+Ta" Received: by mail-qt1-f169.google.com with SMTP id d75a77b69052e-50d6ab4476eso80206031cf.2 for ; Thu, 14 May 2026 17:37:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1778805449; x=1779410249; 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=Gu3u9+TaaOAEplXuQ0oFDZulFeWxf/cbvfTyPklvNszU/WG1hKmbrmKYJ21u/W18+x zrUoajIUj9MrQ/mkZs6epLATz2MoBsWRoU4Blk7IhNB+P4b1Oz4dflCOtTp+XnM66/jG a1Jx92HhjKrAKwukt9YvFT9WYnS/DKPoGDEtSmL8IAZSXU/vVQt13lcjGuQpFa7xXm1D in/wvMil5k28lQb+YE91hvFEelYJjwJ47oVIWSKbpcf7X5A7ic3ocK7tlS4Rek3rtGx5 9i0KTWZ1+s22iV13+MGqVN+1eBx+7fhhMh82NihkoZVz2FgjGGb8+r6ifeaozMWMA7ow /pvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778805449; x=1779410249; 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=a2W4dhiT8lkR23pQItcj6q7Bo35FuFhOnS0MmzY816YWgDjz9exQNqV0jTGVL8J4YX NlaLQa7an3o30Mk7RRCUCrV0YF2c3wq9lcf5eFbY99gY8bF2OSmw+jz4VMkP2qJQqPXw kkPTAX1kXa1UI1yT8/IZT7RJvFvQbNvZheUuf2BCcSgruTT7MhWawBoDfcfs3WhAR8V0 scCANb/8Ao2TnRpGnaLlt/rdmP0NrgQV+fb1H4sCMCzPcCzn2dun/U6fo0FR7TG4iiLL DPWDvKqORB0fNuXj57SvA3QXiVqbvh/kzZovqj/jCuznqOBNDdjKJlufiDkFCJ31l4Hf xInw== X-Forwarded-Encrypted: i=1; AFNElJ9M169Ty01zvZApuUeQMX5PUIBIK9Eti8Xr/m8+bFC3MXW5UpFj89/Pqb8K38EmUylM56S4Mh9o0Ft4rIA=@vger.kernel.org X-Gm-Message-State: AOJu0Yz3ZxHwIlwHq7ybB5ZTe//ujsuA/Z3voUeBpcVPoLk0VjEMwfuE a4SzKSHIeZkEbyp/Lr7ljin3Lb9HomC/0LTzjvINDTUM8+tTc0K+/I7cG6z/rVP2OKs= X-Gm-Gg: Acq92OFiLDvXSOzqxGrWzwZyTIeyGB6InMF7kRpcNl0NU0jX1UTrsSuteHkXTJ+FmPB HhtwupbTM4JPWEvjcwT2Ri+BbW5P+SyEmbfm1YsCEEBtfaFOg9LUwCoVwHnis1CDYADNBkVvn8T uT0gLMRnq/N6OcDihohNdBEjSJw3JmpWoTwo+X/YQGZOLi6RHWNeXiCGvggoJW34aFJA3BpnU6P H6/uFU+eUHSG3wWbjP9M+rj557QaI3qi+ps0wpydtTlJ22iDiIwhYqNEtENDYFdE8NkrO0nCIAI 6H0DItQxVow5EVOJ0ZY23v3xb0LzlNL1UnZYD2rxWqD7nf1cSdX0oNuNOa1hkrItkHkAJMUsEu6 VmeHzotcD7CfVCOBkZHqxEx36lBboQ5rNWItFSpm1h0tHCCxcTwWV2HttC+0KPu9g1n8ij1nWo/ dgiqK9yFtGMA+1x2thkYi21YsYb9GsWHkrWz9IejATBY8Hwz93Lz8= X-Received: by 2002:a0c:f08f:0:b0:8ac:a5bc:a6b4 with SMTP id 6a1803df08f44-8ca0f6f9a59mr28605486d6.36.1778805448958; Thu, 14 May 2026 17:37:28 -0700 (PDT) Received: from plex ([71.181.43.54]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8c90c16366csm36918236d6.40.2026.05.14.17.37.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 May 2026 17:37:28 -0700 (PDT) From: Pasha Tatashin To: kees@kernel.org, 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 v3 3/5] liveupdate: fix u-a-f in luo_file_unpreserve_files() and luo_file_finish() Date: Fri, 15 May 2026 00:37:20 +0000 Message-ID: <20260515003722.938123-4-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260515003722.938123-1-pasha.tatashin@soleen.com> References: <20260515003722.938123-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 --- 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 Fri Jun 12 12:49:00 2026 Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) (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 0242C33BBD7 for ; Fri, 15 May 2026 00:37:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.169 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778805456; cv=none; b=ouO6VveiCzF+84J3E5nN1sZo/H9M//uQPNHnW3eIzOHkX6C1GYeW3C95NgkZ2hDj0HV+NRikAC04wA5qc8Kr6npdqEAch4FhTK2/xU3R8gajQc6uNF+AzPiCiwvZq2cgqxHAOXeLjNFYGd1RE4mdVuIm6gcAm65Hsx1RSpBQBI4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778805456; c=relaxed/simple; bh=K7yLEJ0P3UI98PxjAqHlSSScyatj0IA1RVV15FETm4E=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Z6wt9eYTkQH3TSXCn7Rs6Jc4DgqUQLgg4v2zyEU6NvDGUA0KSzVu55yH6ClEe1rziGzAvTObhXCH+MVQ7O8O1TsFXT7UU1effw/L2VPRlR5eocEQbt3uYfCaDqZlHv+9ydW9TIrbisvfgfM+b18f4v9UscmjzVHq99KRMTXyalc= 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=PRjNu4KL; arc=none smtp.client-ip=209.85.222.169 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="PRjNu4KL" Received: by mail-qk1-f169.google.com with SMTP id af79cd13be357-902deb2412fso955372485a.3 for ; Thu, 14 May 2026 17:37:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1778805451; x=1779410251; 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=IKtBgAtgrIMWIdboSAO5ZG30EAh7PtBJ6wDWGXdz9Wo=; b=PRjNu4KLTCOP7pgjW8FShbOD5J185vcABzXOoJSFx805d/Gl1Y43B2mAUha1AOAPM7 yD4uzn1Vgc1KH6wiA10/mesAiDaMrdPKW79mamTUIyVJ8O+zwG9NWbYTX9GKawjWI1nA uJAWvU8SwinjNJWOxjS9YC/Bx9xIr0262qZBCtXQMhqtQQgKpZz4gUy75lxAKUCYxCQG MVcpMqGsJD9dKVdAo/0EUr4Wgv0bG7gFv9jLNblgKHvfiwK3meM8q+5eFo6CmDLbOiOd E51HGRxsuqVXk3Tjl2/xrYh2fzRrblb3tkg5bOdL7SBZT+4jCA+XLq30+kSkLpYbhzZ7 k1lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778805451; x=1779410251; 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=IKtBgAtgrIMWIdboSAO5ZG30EAh7PtBJ6wDWGXdz9Wo=; b=Vz3XxKVmXiwyIikpGr258id/PzylY4nu8euGTKdpYbOZ8xz9eNtGns/0QeK2MQgxgj KPDlOly35ONLK5Ua7mKfximRsU7KevmbifnBb2niKR19P1hSMazcb6ibdLP86HZR/FFR rmOvM1XzC8MMJ3VuJkVwlJH/8xwUYpiYsEW+ZglJ9CEzClPfeHW1UQMpmMOomXo9oPTe EdkVYM2K0P9RVc3K9FybbAyiCJodIb6dxric6/+NPU1WyqmQCiYzibvkoVgnsOeuGwym 0NQ7o1z+od8Ziso3oAE8yb588CHcpg9TAruKYniDL9zF5xo+CCG+0YnRFOxKpQ0eN8ma xMaQ== X-Forwarded-Encrypted: i=1; AFNElJ9N4tLLZNgHiXw1cGrGBset78ks/mSt8RQ+6JQoiMpdQYlnNVysbeIfokC0aLb3ZVqi2wfmGyc+HPOs6dg=@vger.kernel.org X-Gm-Message-State: AOJu0YznNH9LUbJGW8W0uAuuNIiYlqzwrqH/m+SRNMQMrcjx1oPSGOoR ry3Y8N+ZI0JefberilmzxDd5RHdgAfKsz5qBIWRjHrMOWzYEAUmNwVNM60oyas+po2o= X-Gm-Gg: Acq92OEZ/tQJhUyg5bGQtEZl8r6Ho4UfmZy8chNySgPCXIUZ3abLYXivWPpkevWSEJx mmmnqK53mz18rORwOHYTIKRD2fTQWeKgpOwLNfqpHkJ0Gfh25ABF1bfTUgfS3if60dQSFVFSydl 9SnD+sE+XtfEvMu43RTve0eFowHukVa21dT38eIt1MvE7Lu3Ti3VOFUzCFG1DcxSZxmAQjNf8oY K8zDJ7pmPGBcAlrOz8jl6vQNiHw8WbPwhsoJUwgSmm6IxNZ/odh1zDYcibi6e/sUfo08gAeBKpp rL+pyBEMty9sNqRmN8g425FxqWvUMjZDGQWkn78jwvbsXd0gCPNKbPRk8Vl+uYwTauA6yy7NbX1 Wa2lSw2k8NSVXk5E+PlTEyA5nCBsFBsHcQ0gBx5jlWmNnNajIYbZ1YgTzZipv18HGN8vMd0C1NS FhK94mV4HUn/uGbJoWU8PeJtRDcDFHtJBouYhpit3vdqYeJ9cJXCM= X-Received: by 2002:a05:620a:319f:b0:8f5:5630:cabe with SMTP id af79cd13be357-911ce812018mr342401785a.36.1778805450965; Thu, 14 May 2026 17:37:30 -0700 (PDT) Received: from plex ([71.181.43.54]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8c90c16366csm36918236d6.40.2026.05.14.17.37.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 May 2026 17:37:29 -0700 (PDT) From: Pasha Tatashin To: kees@kernel.org, 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 v3 4/5] liveupdate: fix TOCTOU race in luo_session_retrieve() Date: Fri, 15 May 2026 00:37:21 +0000 Message-ID: <20260515003722.938123-5-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260515003722.938123-1-pasha.tatashin@soleen.com> References: <20260515003722.938123-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 --- 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 5aa0011d9643..f99a82517e51 100644 --- a/kernel/liveupdate/luo_session.c +++ b/kernel/liveupdate/luo_session.c @@ -426,12 +426,11 @@ int luo_session_retrieve(const char *name, struct fil= e **filep) int err; =20 guard(rwsem_read)(&luo_session_serialize_rwsem); - 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 Fri Jun 12 12:49:00 2026 Received: from mail-qv1-f53.google.com (mail-qv1-f53.google.com [209.85.219.53]) (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 1D697342510 for ; Fri, 15 May 2026 00:37:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778805459; cv=none; b=UCdvnLYqa78iRHHTq1oOoNLrPRdEGmVvYOSw3eIvD79JYO+MIPT600zgHRQ0wuM2M+iYKRELDD+TzlHfuDwCXOp7Rn5EPcPbraOHnXXkCSdXueNfPjt+odnbsevuutDF1O3ZHKpMsG1/5ciRi3xFXfRbKJQUfRwktFVT+RZf7yY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778805459; c=relaxed/simple; bh=V0WUQPaDjo3MdPHK5/s7xd85m5/FYQDxZxhE73n3PRY=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lc+xS+pWS5OIveQI1+1loCgyCY0wI78eE/+L73NVNLIpEN4YC4dnjsDSXsdmmhPRmxSv2K2edfaxGwUJZgVbzjr6RJYrzxwPKyRqiqjEJI2jOWsQ/L66jsUMurfT0Und4amx9a5o/XX5DbKCkVyAf3S7eN823ZUamWBoD1vo/G4= 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=deXv27Rg; arc=none smtp.client-ip=209.85.219.53 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="deXv27Rg" Received: by mail-qv1-f53.google.com with SMTP id 6a1803df08f44-8b821f39a12so68775556d6.2 for ; Thu, 14 May 2026 17:37:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1778805452; x=1779410252; 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=deXv27Rg1PVn/4cFmNqG5dufsrWdGuX8tebW+tWbfxym6r6+Pa/zHObkBgzbwW1u2t bTVrek2qn1iYpmEYs6WZqvSc47Y+dxFTMZResyzpYsTwfAH8QR8jxZQGxtjBG/Z8rCpm 4fK2wLBfCLlw1zQGuHA02HkWRzMkbCLOzdpVeDkkRjdulWP7Z4otrxqJy5KwJCJ/H+6F Rs6UBjh5SJZSzVe5qHHh6gcfCj2eZd+efIqeKT3kJTSEt/8g7xy1EhVbGLTyBRGfy5e7 Z8AcjduexrDBpZhJXbQ9+QW2ysLabOC4vjw20rjm5q5E310+7Z7tq95vBU8BBNe4qrPy ObkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778805452; x=1779410252; 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=sJ6S5ecUzGBEENAn1rzUMRccqPjP9T5W8PBHMSJXtZ25Pmw8yFkuzfn9ShC1LgmCzM 2lSGEBut0r0ZpB8g7wIm5Q7/3VSZ88+K16ZTslBnekIhZi66nGL4OMCDuYyQhNZvQ6kP lNvH9+NEzKAKnAinvPVutxtX5YJ2qXVUWqvSH83mNwzALqBn3DfHAMbA6/kVbzV2Q3G8 0SnsXaqOLLZRLTRkn/R2rnqkkkW8iozvKCqykc4rVtgeBqc6OZMeQXOGQU79fMVtrEpb rlDHqMBYRxmm8QLPCB3IkrTJ79G66zfZJgMFBmD3K4YSD6QDWht+iX9iawzrgSlAI9F3 M3JA== X-Forwarded-Encrypted: i=1; AFNElJ95aEF96Ah+4ApFpJDyVx3FTZLCvjElVPEYEYDTllWOlaWgJCnLLEXJXAdJtAe7MxxpN2F+aat/hxwwjZs=@vger.kernel.org X-Gm-Message-State: AOJu0YwebGKhOSiCJUE+KY7ArGD85KwX6wVYL/BzHp8UbuY4nd55rtH8 A3TJ31KKOcYH/Ss/dGbohHD4cEhDIWHolUlBfmUbVH4Q60hHd/dkiDBRUn8UiZRQlRM= X-Gm-Gg: Acq92OGqMorTOvJBE1FTDfEea2lG7mLi5QDjFKTBKVNTCw2+yMnSnQwzg0iEZtN4v3x bIgVIc/fH+KJMtXl/dhpvyK02U9c7j0oHYpLR5y+PBfkymS+2yioO0+z6hCeCvH5Hx3GoJlk5Xd k4L3AUDYx+MNFJtUTxjoZr9xvKlyK3BqRCnkW1n0/A0vjX6HPZweE4V+U00w+LRAqxBprb8yTnV csROwpTDYiF5HzFwT9wuMvnP70FnQHU6FatFcj+yWgEIKrPdSvQsJy32MGtQCRx1Sw1638W6Rvy j4sJqTnI7Q/NkV9aGA+Wka/ArgcSDfE/l8MtLSlZvKnlraFEyZYPuq8vg/DcHy76zFBiRFMcJ5b 2WWFC9LjrBsSMjOSCKioiHZovMIKiSxeQdzdpMKqIFgOjgCBRwc1jX37vTFiflg/CNpsSSeIzkd nWyUZz9LcPHl4xOPco/qBRoFlQM8y0YnTvtHZoJN5afeAgwo1sF94= X-Received: by 2002:a05:6214:5a05:b0:899:f24d:1245 with SMTP id 6a1803df08f44-8ca0f6bda7dmr38872236d6.43.1778805452230; Thu, 14 May 2026 17:37:32 -0700 (PDT) Received: from plex ([71.181.43.54]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8c90c16366csm36918236d6.40.2026.05.14.17.37.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 May 2026 17:37:31 -0700 (PDT) From: Pasha Tatashin To: kees@kernel.org, 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 v3 5/5] liveupdate: Remove unused ser field from struct luo_session Date: Fri, 15 May 2026 00:37:22 +0000 Message-ID: <20260515003722.938123-6-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260515003722.938123-1-pasha.tatashin@soleen.com> References: <20260515003722.938123-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 --- 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