From: Zheng Wang <zyytlz.wz@163.com>
To: zhi.a.wang@intel.com
Cc: 1002992920@qq.com, airlied@gmail.com, airlied@linux.ie,
alex000young@gmail.com, dri-devel@lists.freedesktop.org,
gregkh@linuxfoundation.org, hackerzheng666@gmail.com,
intel-gfx@lists.freedesktop.org,
intel-gvt-dev@lists.freedesktop.org,
joonas.lahtinen@linux.intel.com, linux-kernel@vger.kernel.org,
security@kernel.org, tvrtko.ursulin@linux.intel.com,
zhenyuw@linux.intel.com, zyytlz.wz@163.com
Subject: Re: [Intel-gfx] [PATCH v3] drm/i915/gvt: fix double free bug in split_2MB_gtt_entry
Date: Mon, 19 Dec 2022 17:21:39 +0800 [thread overview]
Message-ID: <20221219092139.222456-1-zyytlz.wz@163.com> (raw)
In-Reply-To: <11728bc1-7b59-1623-b517-d1a0d57eb275@intel.com>
Wang, Zhi A <zhi.a.wang@intel.com> 于2022年12月19日周一 16:22写道:
>
> I think it is a case-by-case thing. For example:
>
> The current scenario in this function looks like below:
>
> caller pass spt a
> function
> alloc spt b
> something error
> free spt a
> return error
>
> The problem is: the function wrongly frees the spt a instead free what
> it allocates.
Thanks for your clear explaination. It’s really helpfult to me.
I think I might know how to fix now.
> A proper fix should be:
>
> caller pass spt a
> function
> alloc spt b
> something error
> *free spt b*
> return error
>
As it's a case-by-case thing, I'll extract the un-done-mapping-dma part from
ppgtt_invalidate_spt and put it in error path. Then I'll add the code of freeing
new allocated spt. If I misunderstand your meaning, feel free to let me know.
Working on a new fix now.
Best regards,
Zheng Wang
next prev parent reply other threads:[~2022-12-19 9:37 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <tencent_ED24158E83CB9885E8BDD173EB5896B51906@qq.com>
2022-09-19 9:30 ` [PATCH] drm/i915/gvt: fix double-free bug in split_2MB_gtt_entry Jani Nikula
2022-09-19 9:55 ` Zheng Hacker
2022-09-21 9:13 ` Zheng Hacker
2022-09-28 3:33 ` [PATCH] drm/i915/gvt: fix double free " Zheng Wang
2022-10-02 14:18 ` Greg KH
2022-10-03 4:36 ` Zheng Hacker
2022-10-06 16:58 ` [PATCH v2] " Zheng Wang
2022-10-06 19:23 ` Greg KH
2022-10-07 0:39 ` Zheng Hacker
2022-10-07 1:37 ` [PATCH v3] " Zheng Wang
2022-10-27 0:01 ` Dave Airlie
2022-10-27 3:26 ` Zheng Hacker
2022-10-27 5:12 ` Dave Airlie
2022-10-30 15:10 ` Zheng Hacker
2022-12-15 10:47 ` Joonas Lahtinen
2022-12-15 11:33 ` Wang, Zhi A
2022-12-15 13:26 ` Zheng Hacker
2022-12-19 7:57 ` [Intel-gfx] " Zheng Wang
2022-12-19 8:22 ` Wang, Zhi A
2022-12-19 9:21 ` Zheng Wang [this message]
2022-12-19 12:46 ` [PATCH v4] [PATCH v4] " Zheng Wang
2022-12-19 12:52 ` [RESEND PATCH " Zheng Wang
2022-12-20 8:22 ` Zhenyu Wang
2022-12-20 9:03 ` Zheng Hacker
2022-12-20 9:40 ` [PATCH v5] " Zheng Wang
2022-12-21 2:58 ` Zhenyu Wang
2022-12-21 5:01 ` Zheng Hacker
2022-12-29 16:56 ` [PATCH v6] " Zheng Wang
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=20221219092139.222456-1-zyytlz.wz@163.com \
--to=zyytlz.wz@163.com \
--cc=1002992920@qq.com \
--cc=airlied@gmail.com \
--cc=airlied@linux.ie \
--cc=alex000young@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=hackerzheng666@gmail.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-gvt-dev@lists.freedesktop.org \
--cc=joonas.lahtinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=security@kernel.org \
--cc=tvrtko.ursulin@linux.intel.com \
--cc=zhenyuw@linux.intel.com \
--cc=zhi.a.wang@intel.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;
as well as URLs for NNTP newsgroup(s).