From: "Koenig, Christian" <Christian.Koenig@amd.com>
To: Daniel Vetter <daniel@ffwll.ch>, Qiang Yu <yuq825@gmail.com>
Cc: dri-devel <dri-devel@lists.freedesktop.org>,
"lima@lists.freedesktop.org" <lima@lists.freedesktop.org>,
"moderated list:DMA BUFFER SHARING FRAMEWORK"
<linaro-mm-sig@lists.linaro.org>,
"open list:DMA BUFFER SHARING FRAMEWORK"
<linux-media@vger.kernel.org>
Subject: Re: [PATCH] dma-buf/resv: fix exclusive fence get
Date: Mon, 30 Sep 2019 08:57:32 +0000 [thread overview]
Message-ID: <910b33a2-36ec-1ed3-e487-adfa61b5ec0e@amd.com> (raw)
In-Reply-To: <CAKMK7uHro9W8GqvuVf0Ruji691U7Trc_jmS3U-OEacLFDH6P1A@mail.gmail.com>
Am 30.09.19 um 09:22 schrieb Daniel Vetter:
> On Sun, Sep 22, 2019 at 2:08 PM Qiang Yu <yuq825@gmail.com> wrote:
>> This causes kernel crash when testing lima driver.
>>
>> Cc: Christian König <christian.koenig@amd.com>
>> Fixes: b8c036dfc66f ("dma-buf: simplify reservation_object_get_fences_rcu a bit")
>> Signed-off-by: Qiang Yu <yuq825@gmail.com>
> Selftest for this would be lovely, now that the basic infrastructure
> is in place ...
What do you have in mind? I wouldn't even know where to start to write
an unit test for this.
Christian.
> -Daniel
>
>> ---
>> drivers/dma-buf/dma-resv.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/dma-buf/dma-resv.c b/drivers/dma-buf/dma-resv.c
>> index 42a8f3f11681..709002515550 100644
>> --- a/drivers/dma-buf/dma-resv.c
>> +++ b/drivers/dma-buf/dma-resv.c
>> @@ -471,7 +471,7 @@ int dma_resv_get_fences_rcu(struct dma_resv *obj,
>> if (pfence_excl)
>> *pfence_excl = fence_excl;
>> else if (fence_excl)
>> - shared[++shared_count] = fence_excl;
>> + shared[shared_count++] = fence_excl;
>>
>> if (!shared_count) {
>> kfree(shared);
>> --
>> 2.17.1
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
>
next prev parent reply other threads:[~2019-09-30 8:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-22 7:49 [PATCH] dma-buf/resv: fix exclusive fence get Qiang Yu
2019-09-22 12:17 ` Chris Wilson
2019-09-22 12:50 ` Chris Wilson
2019-10-10 14:27 ` Qiang Yu
2019-10-10 14:33 ` Koenig, Christian
2019-09-30 7:22 ` Daniel Vetter
2019-09-30 8:57 ` Koenig, Christian [this message]
2019-10-08 16:43 ` Daniel Vetter
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=910b33a2-36ec-1ed3-e487-adfa61b5ec0e@amd.com \
--to=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=lima@lists.freedesktop.org \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-media@vger.kernel.org \
--cc=yuq825@gmail.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