[PATCH] keys/keyctl: Use kfree_rcu instead of kfree

Greg KH gregkh at linuxfoundation.org
Sat Jul 23 14:05:16 UTC 2022


On Sat, Jul 23, 2022 at 07:20:35PM +0530, Siddh Raman Pant via Linux-kernel-mentees wrote:
> In keyctl_watch_key, use kfree_rcu() for freeing watch and wlist
> as they support RCU and have an rcu_head in the struct definition.

That does not explain why this change is needed.  What problem does this
solve?  Why use RCU if you don't have to?  What functionality did you
just change in this commit and why?

And how was this tested?

thanks,

greg k-h



More information about the Linux-security-module-archive mailing list