mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v4 0/2] platform/x86: Fix reference leaks
@ 2023-09-25 14:28 Armin Wolf
  2023-09-25 14:28 ` [PATCH v4 1/2] platform/x86: think-lmi: Fix reference leak Armin Wolf
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Armin Wolf @ 2023-09-25 14:28 UTC (permalink / raw)
  To: markpearson, jorge.lopez2
  Cc: hdegoede, markgross, ilpo.jarvinen, platform-driver-x86, linux-kernel

If a duplicate attribute is found using kset_find_obj(), a reference
to that attribute is returned which needs to be disposed accordingly
using kobject_put(). This issue likely first appeared inside the
dell-wmi-sysman driver, see
commit 7295a996fdab ("platform/x86: dell-sysman: Fix reference leak").
However, it also seems that the bug was copied from this driver into
the think-lmi and hp-bioscfg drivers. Maybe a more abstract
fw_attr_class could prevent such issues in the future by abstracting
away the kobject handling?

Armin Wolf (2):
  platform/x86: think-lmi: Fix reference leak
  platform/x86: hp-bioscfg: Fix reference leak

 drivers/platform/x86/hp/hp-bioscfg/bioscfg.c | 14 ++++++++----
 drivers/platform/x86/think-lmi.c             | 24 ++++++++++++++++----
 2 files changed, 30 insertions(+), 8 deletions(-)

--
2.39.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-10-04  9:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-25 14:28 [PATCH v4 0/2] platform/x86: Fix reference leaks Armin Wolf
2023-09-25 14:28 ` [PATCH v4 1/2] platform/x86: think-lmi: Fix reference leak Armin Wolf
2023-09-25 14:28 ` [PATCH v4 2/2] platform/x86: hp-bioscfg: " Armin Wolf
2023-09-25 18:50   ` Lopez, Jorge A (Security)
2023-10-04  9:55 ` [PATCH v4 0/2] platform/x86: Fix reference leaks Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®