mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:24:47 +01:00
12 hotfixes. 7 are cc:stable. 8 are for MM.
All are singletons - please see the changelogs for details. -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQTTMBEPP41GrTpTJgfdBJ7gKXxAjgUCaaDF4AAKCRDdBJ7gKXxA jhv5AQDv+B9rPkFJ0dlSS/hXqsDGqy3dGj/grJM0dw7LhkPHzgEAi/bV6D1jx0k3 k0hcP3JUxE54+a7liLadPDLIObOMLgo= =R1ap -----END PGP SIGNATURE----- Merge tag 'mm-hotfixes-stable-2026-02-26-14-14' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull misc fixes from Andrew Morton: "12 hotfixes. 7 are cc:stable. 8 are for MM. All are singletons - please see the changelogs for details" * tag 'mm-hotfixes-stable-2026-02-26-14-14' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: MAINTAINERS: update Yosry Ahmed's email address mailmap: add entry for Daniele Alessandrelli mm: fix NULL NODE_DATA dereference for memoryless nodes on boot mm/tracing: rss_stat: ensure curr is false from kthread context mm/kfence: fix KASAN hardware tag faults during late enablement mm/damon/core: disallow non-power of two min_region_sz Squashfs: check metadata block offset is within range MAINTAINERS, mailmap: update e-mail address for Vlastimil Babka liveupdate: luo_file: remember retrieve() status mm: thp: deny THP for files on anonymous inodes mm: change vma_alloc_folio_noprof() macro to inline function mm/kfence: disable KFENCE upon KASAN HW tags enablement
This commit is contained in:
commit
69062f234a
13 changed files with 102 additions and 42 deletions
|
|
@ -134,9 +134,12 @@ static LIST_HEAD(luo_file_handler_list);
|
|||
* state that is not preserved. Set by the handler's .preserve()
|
||||
* callback, and must be freed in the handler's .unpreserve()
|
||||
* callback.
|
||||
* @retrieved: A flag indicating whether a user/kernel in the new kernel has
|
||||
* @retrieve_status: Status code indicating whether a user/kernel in the new kernel has
|
||||
* successfully called retrieve() on this file. This prevents
|
||||
* multiple retrieval attempts.
|
||||
* multiple retrieval attempts. A value of 0 means a retrieve()
|
||||
* has not been attempted, a positive value means the retrieve()
|
||||
* was successful, and a negative value means the retrieve()
|
||||
* failed, and the value is the error code of the call.
|
||||
* @mutex: A mutex that protects the fields of this specific instance
|
||||
* (e.g., @retrieved, @file), ensuring that operations like
|
||||
* retrieving or finishing a file are atomic.
|
||||
|
|
@ -161,7 +164,7 @@ struct luo_file {
|
|||
struct file *file;
|
||||
u64 serialized_data;
|
||||
void *private_data;
|
||||
bool retrieved;
|
||||
int retrieve_status;
|
||||
struct mutex mutex;
|
||||
struct list_head list;
|
||||
u64 token;
|
||||
|
|
@ -298,7 +301,6 @@ int luo_preserve_file(struct luo_file_set *file_set, u64 token, int fd)
|
|||
luo_file->file = file;
|
||||
luo_file->fh = fh;
|
||||
luo_file->token = token;
|
||||
luo_file->retrieved = false;
|
||||
mutex_init(&luo_file->mutex);
|
||||
|
||||
args.handler = fh;
|
||||
|
|
@ -577,7 +579,12 @@ int luo_retrieve_file(struct luo_file_set *file_set, u64 token,
|
|||
return -ENOENT;
|
||||
|
||||
guard(mutex)(&luo_file->mutex);
|
||||
if (luo_file->retrieved) {
|
||||
if (luo_file->retrieve_status < 0) {
|
||||
/* Retrieve was attempted and it failed. Return the error code. */
|
||||
return luo_file->retrieve_status;
|
||||
}
|
||||
|
||||
if (luo_file->retrieve_status > 0) {
|
||||
/*
|
||||
* Someone is asking for this file again, so get a reference
|
||||
* for them.
|
||||
|
|
@ -590,16 +597,19 @@ int luo_retrieve_file(struct luo_file_set *file_set, u64 token,
|
|||
args.handler = luo_file->fh;
|
||||
args.serialized_data = luo_file->serialized_data;
|
||||
err = luo_file->fh->ops->retrieve(&args);
|
||||
if (!err) {
|
||||
luo_file->file = args.file;
|
||||
|
||||
/* Get reference so we can keep this file in LUO until finish */
|
||||
get_file(luo_file->file);
|
||||
*filep = luo_file->file;
|
||||
luo_file->retrieved = true;
|
||||
if (err) {
|
||||
/* Keep the error code for later use. */
|
||||
luo_file->retrieve_status = err;
|
||||
return err;
|
||||
}
|
||||
|
||||
return err;
|
||||
luo_file->file = args.file;
|
||||
/* Get reference so we can keep this file in LUO until finish */
|
||||
get_file(luo_file->file);
|
||||
*filep = luo_file->file;
|
||||
luo_file->retrieve_status = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int luo_file_can_finish_one(struct luo_file_set *file_set,
|
||||
|
|
@ -615,7 +625,7 @@ static int luo_file_can_finish_one(struct luo_file_set *file_set,
|
|||
args.handler = luo_file->fh;
|
||||
args.file = luo_file->file;
|
||||
args.serialized_data = luo_file->serialized_data;
|
||||
args.retrieved = luo_file->retrieved;
|
||||
args.retrieve_status = luo_file->retrieve_status;
|
||||
can_finish = luo_file->fh->ops->can_finish(&args);
|
||||
}
|
||||
|
||||
|
|
@ -632,7 +642,7 @@ static void luo_file_finish_one(struct luo_file_set *file_set,
|
|||
args.handler = luo_file->fh;
|
||||
args.file = luo_file->file;
|
||||
args.serialized_data = luo_file->serialized_data;
|
||||
args.retrieved = luo_file->retrieved;
|
||||
args.retrieve_status = luo_file->retrieve_status;
|
||||
|
||||
luo_file->fh->ops->finish(&args);
|
||||
luo_flb_file_finish(luo_file->fh);
|
||||
|
|
@ -788,7 +798,6 @@ int luo_file_deserialize(struct luo_file_set *file_set,
|
|||
luo_file->file = NULL;
|
||||
luo_file->serialized_data = file_ser[i].data;
|
||||
luo_file->token = file_ser[i].token;
|
||||
luo_file->retrieved = false;
|
||||
mutex_init(&luo_file->mutex);
|
||||
list_add_tail(&luo_file->list, &file_set->files_list);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue