From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
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 18:44:28 +0200 (EET) [thread overview]
Message-ID: <24d6b879-6874-22f7-c8e6-90f3f0968d9f@linux.intel.com> (raw)
In-Reply-To: <bd9e80db-a80f-44d1-bcb9-a14ec0abc64f@suswa.mountain>
[-- Attachment #1: Type: text/plain, Size: 1689 bytes --]
On Mon, 13 Nov 2023, Dan Carpenter wrote:
> 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.
I'll have politely disagree beyond that the symptoms are indeed about the
same, the problem is clearly different like you immediately admit even
yourself by stating this: ;-)
> It's just that it needs to be freed different ways depending on where
> you are.
...And that's because "it" actually changed in between so the problem
became a different one.
> To me splitting it up makes it harder to review
This has already been proven incorrect in the context of this patch so
your argument is rather weak... While reviewing it I clearly noted that
the different way of handling things was not properly covered, and that
was because what needs to be "freed" was changed by
kobject_init_and_add(). If one would have done them separately, each
commit message would have been more to the point and it would have been
simpler to review which is exactly the opposite to your claim. But I guess
we'll end up disagreing on this too :-).
> and I would not allow it in Staging. You can't fix half the problem.
I don't have that strong opinion on this so Harshit please follow what
Dan is suggesting, just fix the changelog to clearly cover both cases.
--
i.
next prev parent reply other threads:[~2023-11-13 16:44 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
2023-11-13 16:44 ` Ilpo Järvinen [this message]
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=24d6b879-6874-22f7-c8e6-90f3f0968d9f@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=dan.carpenter@linaro.org \
--cc=darren.kenny@oracle.com \
--cc=error27@gmail.com \
--cc=harshit.m.mogalapalli@oracle.com \
--cc=hdegoede@redhat.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
Powered by JetHome