Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] proc: separate __free() declaration and initialization in
  map_files_mm()
--

commit 6e8b44b478838f53cfc44f13f68cf03b45a869ce
Author: Christian Brauner <[email protected]>

proc: look up map_files vma without exec_update_lock held

This commit restricts holding exec_update_lock during /proc/<pid>/map_files
symlink resolution to the access check and mm pinning in map_files_mm(),
performing the VMA lookup after releasing the lock.

> diff --git a/fs/proc/base.c b/fs/proc/base.c
> index 7685660c36241..b28bd6c57e1d8 100644
> --- a/fs/proc/base.c
> +++ b/fs/proc/base.c
> @@ -2228,18 +2228,40 @@ static const struct dentry_operations 
> tid_map_files_dentry_operations = {
>       .d_delete       = pid_delete_dentry,
>  };
>  
> -static int map_files_get_link(struct dentry *dentry, struct path *path,
> -                           struct task_struct *task)
> +/* Check the access and pin the mm with exec_update_lock held. */
> +static struct mm_struct *map_files_mm(struct inode *inode)
> +{
> +     struct task_struct *task __free(put_task) = NULL;
> +     struct mm_struct *mm;
> +     int err;
> +
> +     task = get_proc_task(inode);

[Severity: Low]
This isn't a bug, but per the cleanup.h convention, task can be defined
and initialized with get_proc_task(inode) in a single statement rather
than being initialized to NULL and assigned right after.

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=17

Reply via email to