From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 120C930DD10 for ; Wed, 17 Dec 2025 21:28:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766006924; cv=none; b=eIroTJqCkzHexlSWEuite27AwE8gji5EFUwzXOygAGIiaaJH7WxF67v3jV0+LgQmdZ9/JWq8L4DmoyOW308kEF2KhRckkcVhXSuKjVXIXMzSP+2xzvTWqS3CBoNaLP6Hllw/zApSwE2xPN16hf/RZeTrvWnDntI0H0EWpaABPg8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766006924; c=relaxed/simple; bh=xfl02CG+TS5kWAt7sG3VEK4sFlVq9Ydh0ECbRE9GwL8=; h=Date:To:From:Subject:Message-Id; b=NWnrQk1jFD82Wpf4XV6bJXIoPsZJ+G9piC2wymt8K8MiQCkVNAv4+qK5qwRKhbsYOXj1GqvBKdrbbYMH++TC7ruHbGpS69RAYn6c1SOPql0PdR2jkevyugZsuHLIuhiNpQAc31BkO2j3NjIe0sWqLrOr6fVCfLTI5hBWR3N2cXM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=LVHSpU07; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="LVHSpU07" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 878ABC4CEFB; Wed, 17 Dec 2025 21:28:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1766006923; bh=xfl02CG+TS5kWAt7sG3VEK4sFlVq9Ydh0ECbRE9GwL8=; h=Date:To:From:Subject:From; b=LVHSpU073yvmrmRIwKHM8iGNc5xsLOM3qjmRPAXymjLo6sq8dDzgqIbtBQS8P4uSG wWh8STNCLYKoM9OB2whswWv4iX4KvdFw+dn6A4QDld5Xj8lPjrnsw0bw8UksREgApR b8KMDHslhMfygNKk7X2zetdPF3Ipaio9izpucqZE= Date: Wed, 17 Dec 2025 13:28:42 -0800 To: mm-commits@vger.kernel.org,tamird@gmail.com,rppt@kernel.org,rientjes@google.com,pratyush@kernel.org,pmladek@suse.com,kees@kernel.org,graf@amazon.com,ebiggers@kernel.org,dmatlack@google.com,davidgow@google.com,dan.carpenter@linaro.org,corbet@lwn.net,pasha.tatashin@soleen.com,akpm@linux-foundation.org From: Andrew Morton Subject: + liveupdate-luo_file-use-private-list.patch added to mm-nonmm-unstable branch Message-Id: <20251217212843.878ABC4CEFB@smtp.kernel.org> Precedence: bulk X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: The patch titled Subject: liveupdate: luo_file: use private list has been added to the -mm mm-nonmm-unstable branch. Its filename is liveupdate-luo_file-use-private-list.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/liveupdate-luo_file-use-private-list.patch This patch will later appear in the mm-nonmm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there most days ------------------------------------------------------ From: Pasha Tatashin Subject: liveupdate: luo_file: use private list Date: Wed, 26 Nov 2025 13:57:25 -0500 Switch LUO to use the private list iterators. Link: https://lkml.kernel.org/r/20251126185725.4164769-4-pasha.tatashin@soleen.com Signed-off-by: Pasha Tatashin Cc: Dan Carpenter Cc: Alexander Graf Cc: David Gow Cc: David Matlack Cc: David Rientjes Cc: Eric Biggers Cc: Jonathan Corbet Cc: Kees Cook Cc: Mike Rapoport Cc: Petr Mladek Cc: Pratyush Yadav Cc: Tamir Duberstein Signed-off-by: Andrew Morton --- kernel/liveupdate/luo_file.c | 7 ++++--- kernel/liveupdate/luo_internal.h | 7 ------- 2 files changed, 4 insertions(+), 10 deletions(-) --- a/kernel/liveupdate/luo_file.c~liveupdate-luo_file-use-private-list +++ a/kernel/liveupdate/luo_file.c @@ -104,6 +104,7 @@ #include #include #include +#include #include #include #include @@ -273,7 +274,7 @@ int luo_preserve_file(struct luo_file_se goto err_fput; err = -ENOENT; - luo_list_for_each_private(fh, &luo_file_handler_list, list) { + list_private_for_each_entry(fh, &luo_file_handler_list, list) { if (fh->ops->can_preserve(fh, file)) { err = 0; break; @@ -768,7 +769,7 @@ int luo_file_deserialize(struct luo_file bool handler_found = false; struct luo_file *luo_file; - luo_list_for_each_private(fh, &luo_file_handler_list, list) { + list_private_for_each_entry(fh, &luo_file_handler_list, list) { if (!strcmp(fh->compatible, file_ser[i].compatible)) { handler_found = true; break; @@ -843,7 +844,7 @@ int liveupdate_register_file_handler(str return -EBUSY; /* Check for duplicate compatible strings */ - luo_list_for_each_private(fh_iter, &luo_file_handler_list, list) { + list_private_for_each_entry(fh_iter, &luo_file_handler_list, list) { if (!strcmp(fh_iter->compatible, fh->compatible)) { pr_err("File handler registration failed: Compatible string '%s' already registered.\n", fh->compatible); --- a/kernel/liveupdate/luo_internal.h~liveupdate-luo_file-use-private-list +++ a/kernel/liveupdate/luo_internal.h @@ -40,13 +40,6 @@ static inline int luo_ucmd_respond(struc */ #define luo_restore_fail(__fmt, ...) panic(__fmt, ##__VA_ARGS__) -/* Mimics list_for_each_entry() but for private list head entries */ -#define luo_list_for_each_private(pos, head, member) \ - for (struct list_head *__iter = (head)->next; \ - __iter != (head) && \ - ({ pos = container_of(__iter, typeof(*(pos)), member); 1; }); \ - __iter = __iter->next) - /** * struct luo_file_set - A set of files that belong to the same sessions. * @files_list: An ordered list of files associated with this session, it is _ Patches currently in -mm which might be from pasha.tatashin@soleen.com are liveupdate-luo_flb-introduce-file-lifecycle-bound-global-state.patch tests-liveupdate-add-in-kernel-liveupdate-test.patch list-add-primitives-for-private-list-manipulations.patch list-add-kunit-test-for-private-list-primitives.patch liveupdate-luo_file-use-private-list.patch