Re: [PATCH v5] binder: use bitmap for faster descriptor lookup

Markus Elfring
2024-06-13T16:51:32Z

…
> +++ b/drivers/android/binder.c
…
> +static void try_shrink_dmap(struct binder_proc *proc)
> +{
…
> + binder_proc_lock(proc);
> + nbits = dbitmap_shrink_nbits(&proc->dmap);
> + binder_proc_unlock(proc);
…
> + new = bitmap_zalloc(nbits, GFP_KERNEL);
> + binder_proc_lock(proc);
> + dbitmap_shrink(&proc->dmap, new, nbits);
> + binder_proc_unlock(proc);
> +}
…

Would you become interested to apply lock guards?
https://elixir.bootlin.com/linux/v6.10-rc3/source/include/linux/cleanup.h#L124

Regards,
Markus