From: srinivas pandruvada <srinivas.pandruvada@linux.intel.com>
To: Dongliang Mu <dzm91@hust.edu.cn>,
Hans de Goede <hdegoede@redhat.com>,
Mark Gross <markgross@kernel.org>
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH linux-next v2 1/3] platform/x86/intel/tpmi: Fix double free in tpmi_create_device()
Date: Sun, 19 Mar 2023 23:32:37 -0700 [thread overview]
Message-ID: <8207eb83d6b2488cfb524befdbb7184c8503f997.camel@linux.intel.com> (raw)
In-Reply-To: <3c2f9226-8741-4e51-241f-5dbac45cc794@hust.edu.cn>
On Mon, 2023-03-20 at 10:43 +0800, Dongliang Mu wrote:
>
> On 2023/3/17 18:27, srinivas pandruvada wrote:
> > Hi Dongliang,
> >
> > ...
> > ...
> >
> >
> > > Hi Srinivas and Hans,
> > >
> > > How about folding these three patches into one patch and resend a
> > > v3
> > > patch?
> > >
> > > This will get all people together and avoid the previous
> > > embarrassing
> > > sitation.
> > This is NOT an embarrassing situation.
> > Thanks for finding and fixing the issue.
> >
> > Thanks,
> > Srinivas
> >
> Hi Srinivas,
>
> Any conclusion about this patch set?
Hans can reorder patches as he suggested and apply.
Thanks,
Srinivas
>
> > > Dongliang Mu
> > >
> > > > > Regards,
> > > > >
> > > > > Hans
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > > ---
> > > > > > drivers/platform/x86/intel/tpmi.c | 17 ++++-------------
> > > > > > 1 file changed, 4 insertions(+), 13 deletions(-)
> > > > > >
> > > > > > diff --git a/drivers/platform/x86/intel/tpmi.c
> > > > > > b/drivers/platform/x86/intel/tpmi.c
> > > > > > index c999732b0f1e..882fe5e4763f 100644
> > > > > > --- a/drivers/platform/x86/intel/tpmi.c
> > > > > > +++ b/drivers/platform/x86/intel/tpmi.c
> > > > > > @@ -215,8 +215,8 @@ static int tpmi_create_device(struct
> > > > > > intel_tpmi_info *tpmi_info,
> > > > > >
> > > > > > feature_vsec_dev =
> > > > > > kzalloc(sizeof(*feature_vsec_dev),
> > > > > > GFP_KERNEL);
> > > > > > if (!feature_vsec_dev) {
> > > > > > - ret = -ENOMEM;
> > > > > > - goto free_res;
> > > > > > + kfree(res);
> > > > > > + return -ENOMEM;
> > > > > > }
> > > > > >
> > > > > > snprintf(feature_id_name,
> > > > > > sizeof(feature_id_name),
> > > > > > "tpmi-
> > > > > > %s", name);
> > > > > > @@ -242,17 +242,8 @@ static int tpmi_create_device(struct
> > > > > > intel_tpmi_info *tpmi_info,
> > > > > > * feature_vsec_dev memory is also freed as part
> > > > > > of
> > > > > > device
> > > > > > * delete.
> > > > > > */
> > > > > > - ret = intel_vsec_add_aux(vsec_dev->pcidev,
> > > > > > &vsec_dev-
> > > > > > > auxdev.dev,
> > > > > > - feature_vsec_dev,
> > > > > > feature_id_name);
> > > > > > - if (ret)
> > > > > > - goto free_res;
> > > > > > -
> > > > > > - return 0;
> > > > > > -
> > > > > > -free_res:
> > > > > > - kfree(res);
> > > > > > -
> > > > > > - return ret;
> > > > > > + return intel_vsec_add_aux(vsec_dev->pcidev,
> > > > > > &vsec_dev-
> > > > > > > auxdev.dev,
> > > > > > + feature_vsec_dev,
> > > > > > feature_id_name);
> > > > > > }
> > > > > >
> > > > > > static int tpmi_create_devices(struct intel_tpmi_info
> > > > > > *tpmi_info)
next prev parent reply other threads:[~2023-03-20 6:33 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230309040107.534716-1-dzm91@hust.edu.cn>
2023-03-09 4:01 ` [PATCH linux-next v2 1/3] platform/x86/intel/tpmi: Fix double free in tpmi_create_device() Dongliang Mu
2023-03-14 14:22 ` Dan Carpenter
2023-03-16 14:25 ` Hans de Goede
2023-03-16 18:18 ` srinivas pandruvada
2023-03-17 1:28 ` Dongliang Mu
2023-03-17 8:51 ` Hans de Goede
2023-03-17 10:23 ` srinivas pandruvada
2023-03-17 11:57 ` Dongliang Mu
2023-03-17 10:27 ` srinivas pandruvada
2023-03-20 2:43 ` Dongliang Mu
2023-03-20 6:32 ` srinivas pandruvada [this message]
2023-03-20 10:32 ` Hans de Goede
2023-03-09 4:01 ` [PATCH linux-next v2 2/3] drivers/platform/x86/intel/tpmi: revise the comment of intel_vsec_add_aux Dongliang Mu
2023-03-20 10:33 ` Hans de Goede
2023-03-20 10:57 ` Dongliang Mu
2023-03-20 13:40 ` Hans de Goede
2023-03-09 4:01 ` [PATCH linux-next v2 3/3] drivers/platform/x86/intel: fix a memory leak in intel_vsec_add_aux Dongliang Mu
2023-03-20 10:31 ` Hans de Goede
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=8207eb83d6b2488cfb524befdbb7184c8503f997.camel@linux.intel.com \
--to=srinivas.pandruvada@linux.intel.com \
--cc=dzm91@hust.edu.cn \
--cc=hdegoede@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=markgross@kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
/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