landlock-lsm / linux

Linux kernel - See Landlock issues
https://git.kernel.org/pub/scm/linux/kernel/git/mic/linux.git/
Other
33 stars 9 forks source link

Use the kref API #20

Closed l0kod closed 3 months ago

l0kod commented 5 months ago

Landlock currently uses refcount_t types, but it would be better to use struct kref and the related helpers instead.

Madhupatel08 commented 3 months ago

Hi @l0kod, can you assign this task to me, I'm working on it, and will raise a PR by tomorrow

l0kod commented 3 months ago

Hi @Madhupatel08! Looking at the consequence of using kref in the current code, I'm starting to think it may not be a good idea because it could increase code complexity for not much benefit. However, you can still send a patch with this change and we'll discuss on the mailing list with other reviewers looking at concret code. Anyway, it would still be a good first start if this is for Outreachy.

FYI, the Linux kernel doesn't work with PRs but patches sent by emails as explained in the documentation.

l0kod commented 3 months ago

As discussed offline, we should spend time on other tasks such as #19 or #23 .