lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Wed, 9 Jan 2019 15:14:10 -0800
From:   Machiry Aravind Kumar <>
Subject: Incorrect usage of kobject_init_and_add?

Hi all,

I see some discrepancy in how the function: kobject_init_and_add is
used in various places of the kernel.

According to the docs, when kobject_init_and_add fails, the caller is
supposed to call kobject_put on the corresponding kobj.

We found several instances where this is indeed true:

However, there are again several places where this is not the case.
For instance:

Why is this discrepancy? Should these be fixed to add kobject_put in
their error path?


Powered by blists - more mailing lists