From: Dan Carpenter <dan.carpenter@linaro.org>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: "Harshit Mogalapalli" <harshit.m.mogalapalli@oracle.com>,
"Jorge Lopez" <jorge.lopez2@hp.com>,
"Hans de Goede" <hdegoede@redhat.com>,
"Mark Gross" <markgross@kernel.org>,
"Thomas Weißschuh" <linux@weissschuh.net>,
platform-driver-x86@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org, error27@gmail.com,
vegard.nossum@oracle.com, darren.kenny@oracle.com,
"kernel test robot" <lkp@intel.com>
Subject: Re: [PATCH v2 4/4] platform/x86: hp-bioscfg: Fix error handling in hp_add_other_attributes()
Date: Mon, 13 Nov 2023 19:01:04 +0300 [thread overview]
Message-ID: <bd9e80db-a80f-44d1-bcb9-a14ec0abc64f@suswa.mountain> (raw)
In-Reply-To: <a0b5d36a-aad8-eaf5-7241-85d1c874ff8@linux.intel.com>
On Mon, Nov 13, 2023 at 04:15:50PM +0200, Ilpo Järvinen wrote:
> This relates to the 2nd problem (missing kobject_put()) and will be
> covered by the other patch. Don't try to solve this in the first patch
> at all!
>
> There are two indepedent problems:
> - Before kobject_init_and_add(), kfree() is missing
> - After kobject_init_and_add(), kobject_put() is missing
It's the same problem, though. The attr_name_kobj is leaked on all the
error paths. It's just that it needs to be freed different ways
depending on where you are. To me splitting it up makes it harder to
review and I would not allow it in Staging. You can't fix half the
problem.
regards,
dan carpenter
next prev parent reply other threads:[~2023-11-13 16:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-10 14:29 [PATCH v2 1/4] platform/x86: hp-bioscfg: Remove unused obj " Harshit Mogalapalli
2023-11-10 14:29 ` [PATCH v2 2/4] platform/x86: hp-bioscfg: Simplify return check " Harshit Mogalapalli
2023-11-10 14:29 ` [PATCH v2 3/4] platform/x86: hp-bioscfg: move mutex_lock down " Harshit Mogalapalli
2023-11-10 14:35 ` Ilpo Järvinen
2023-11-10 14:29 ` [PATCH v2 4/4] platform/x86: hp-bioscfg: Fix error handling " Harshit Mogalapalli
2023-11-10 14:44 ` Ilpo Järvinen
2023-11-10 19:58 ` Harshit Mogalapalli
2023-11-13 13:31 ` Ilpo Järvinen
2023-11-13 13:57 ` Harshit Mogalapalli
2023-11-13 14:15 ` Ilpo Järvinen
2023-11-13 16:01 ` Dan Carpenter [this message]
2023-11-13 16:44 ` Ilpo Järvinen
2023-11-10 14:31 ` [PATCH v2 1/4] platform/x86: hp-bioscfg: Remove unused obj " Ilpo Järvinen
2023-11-10 14:45 ` Ilpo Järvinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bd9e80db-a80f-44d1-bcb9-a14ec0abc64f@suswa.mountain \
--to=dan.carpenter@linaro.org \
--cc=darren.kenny@oracle.com \
--cc=error27@gmail.com \
--cc=harshit.m.mogalapalli@oracle.com \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jorge.lopez2@hp.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=lkp@intel.com \
--cc=markgross@kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=vegard.nossum@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®