Re: [PATCH] chardev: Simplify usage of try_module_get()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 17, 2023 at 11:13:53AM +0200, Uwe Kleine-König wrote:

> I don't understand what you intend to say here. What is "that"? Are you
> talking about
> 
> 	owner && !try_module_get(owner)
> 
> vs
> 
> 	!try_module_get(owner)
> 
> or the following line with kobject_get_unless_zero? Do you doubt the
> validity of my patch, or is it about something try_module_get()
> could/should do more than it currently does?

I'm saying that it would be a good idea to turn try_module_get() into
an inline in all cases, including the CONFIG_MODULE_UNLOAD one.
Turning it into something like !module || __try_module_get(module),
with the latter being out of line.  With that done, your patch would be
entirely unobjectionable...




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux