mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/2] platform/x86: Fix reference leaks
@ 2023-09-25 13:28 Armin Wolf
  2023-09-25 13:28 ` [PATCH v3 1/2] platform/x86: think-lmi: Fix reference leak Armin Wolf
  2023-09-25 13:28 ` [PATCH v3 2/2] platform/x86: hp-bioscfg: " Armin Wolf
  0 siblings, 2 replies; 4+ messages in thread
From: Armin Wolf @ 2023-09-25 13: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] 4+ messages in thread

end of thread, other threads:[~2023-09-25 13:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-25 13:28 [PATCH v3 0/2] platform/x86: Fix reference leaks Armin Wolf
2023-09-25 13:28 ` [PATCH v3 1/2] platform/x86: think-lmi: Fix reference leak Armin Wolf
2023-09-25 13:28 ` [PATCH v3 2/2] platform/x86: hp-bioscfg: " Armin Wolf
2023-09-25 13:38   ` Ilpo Järvinen

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®