All of lore.kernel.org
 help / color / mirror / Atom feed
From: Charan Teja Kalla <quic_charante@quicinc.com>
To: "T.J. Mercier" <tjmercier@google.com>
Cc: "Sumit Semwal" <sumit.semwal@linaro.org>,
	"Christian König" <christian.koenig@amd.com>,
	"Hridya Valsaraju" <hridya@google.com>,
	daniel.vetter@ffwll.ch,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linaro-mm-sig@lists.linaro.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dma-buf: call dma_buf_stats_setup after dmabuf is in valid list
Date: Tue, 10 May 2022 08:13:31 +0530	[thread overview]
Message-ID: <51bc6d33-c5f5-2a6e-fd83-ffebbe2e0202@quicinc.com> (raw)
In-Reply-To: <CABdmKX2V55tA-Or6Dd+bpbcv3fDHps_+zHHJQwhz819LX_2RSQ@mail.gmail.com>

Hello Mercier,

On 5/10/2022 3:19 AM, T.J. Mercier wrote:
> On Mon, May 9, 2022 at 12:50 PM Charan Teja Kalla
> <quic_charante@quicinc.com> wrote:
>> From: Charan Teja Reddy <quic_charante@quicinc.com>
>>
>> When dma_buf_stats_setup() fails, it closes the dmabuf file which
>> results into the calling of dma_buf_file_release() where it does
>> list_del(&dmabuf->list_node) with out first adding it to the proper
>> list. This is resulting into panic in the below path:
>> __list_del_entry_valid+0x38/0xac
>> dma_buf_file_release+0x74/0x158
>> __fput+0xf4/0x428
>> ____fput+0x14/0x24
>> task_work_run+0x178/0x24c
>> do_notify_resume+0x194/0x264
>> work_pending+0xc/0x5f0
>>
>> Fix it by moving the dma_buf_stats_setup() after dmabuf is added to the
>> list.
>>
>> Fixes: bdb8d06dfefd ("dmabuf: Add the capability to expose DMA-BUF stats in sysfs")
>> Signed-off-by: Charan Teja Reddy <quic_charante@quicinc.com>
> Tested-by: T.J. Mercier <tjmercier@google.com>
> Acked-by: T.J. Mercier <tjmercier@google.com>
> 

Thanks for the Ack. Also Realized that it should have:
Cc: <stable@vger.kernel.org> # 5.15.x+

WARNING: multiple messages have this Message-ID (diff)
From: Charan Teja Kalla <quic_charante@quicinc.com>
To: "T.J. Mercier" <tjmercier@google.com>
Cc: daniel.vetter@ffwll.ch, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	"Christian König" <christian.koenig@amd.com>,
	linaro-mm-sig@lists.linaro.org,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Hridya Valsaraju" <hridya@google.com>,
	"Sumit Semwal" <sumit.semwal@linaro.org>,
	linux-media@vger.kernel.org
Subject: Re: [PATCH] dma-buf: call dma_buf_stats_setup after dmabuf is in valid list
Date: Tue, 10 May 2022 08:13:31 +0530	[thread overview]
Message-ID: <51bc6d33-c5f5-2a6e-fd83-ffebbe2e0202@quicinc.com> (raw)
In-Reply-To: <CABdmKX2V55tA-Or6Dd+bpbcv3fDHps_+zHHJQwhz819LX_2RSQ@mail.gmail.com>

Hello Mercier,

On 5/10/2022 3:19 AM, T.J. Mercier wrote:
> On Mon, May 9, 2022 at 12:50 PM Charan Teja Kalla
> <quic_charante@quicinc.com> wrote:
>> From: Charan Teja Reddy <quic_charante@quicinc.com>
>>
>> When dma_buf_stats_setup() fails, it closes the dmabuf file which
>> results into the calling of dma_buf_file_release() where it does
>> list_del(&dmabuf->list_node) with out first adding it to the proper
>> list. This is resulting into panic in the below path:
>> __list_del_entry_valid+0x38/0xac
>> dma_buf_file_release+0x74/0x158
>> __fput+0xf4/0x428
>> ____fput+0x14/0x24
>> task_work_run+0x178/0x24c
>> do_notify_resume+0x194/0x264
>> work_pending+0xc/0x5f0
>>
>> Fix it by moving the dma_buf_stats_setup() after dmabuf is added to the
>> list.
>>
>> Fixes: bdb8d06dfefd ("dmabuf: Add the capability to expose DMA-BUF stats in sysfs")
>> Signed-off-by: Charan Teja Reddy <quic_charante@quicinc.com>
> Tested-by: T.J. Mercier <tjmercier@google.com>
> Acked-by: T.J. Mercier <tjmercier@google.com>
> 

Thanks for the Ack. Also Realized that it should have:
Cc: <stable@vger.kernel.org> # 5.15.x+

  reply	other threads:[~2022-05-10  2:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-09 19:49 [PATCH] dma-buf: call dma_buf_stats_setup after dmabuf is in valid list Charan Teja Kalla
2022-05-09 19:49 ` Charan Teja Kalla
2022-05-09 21:49 ` T.J. Mercier
2022-05-09 21:49   ` T.J. Mercier
2022-05-10  2:43   ` Charan Teja Kalla [this message]
2022-05-10  2:43     ` Charan Teja Kalla
2022-05-10  9:31     ` Christian König
2022-05-10  9:31       ` Christian König

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=51bc6d33-c5f5-2a6e-fd83-ffebbe2e0202@quicinc.com \
    --to=quic_charante@quicinc.com \
    --cc=christian.koenig@amd.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hridya@google.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=sumit.semwal@linaro.org \
    --cc=tjmercier@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.