From: "Christian König" <christian.koenig@amd.com>
To: Charan Teja Kalla <quic_charante@quicinc.com>,
Greg KH <gregkh@linuxfoundation.org>
Cc: sumit.semwal@linaro.org, hridya@google.com,
daniel.vetter@ffwll.ch, tjmercier@google.com,
linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org,
linaro-mm-sig@lists.linaro.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V3] dma-buf: ensure unique directory name for dmabuf stats
Date: Fri, 13 May 2022 12:29:48 +0200 [thread overview]
Message-ID: <0071e117-1d91-b086-7cb1-976b2a1c3498@amd.com> (raw)
In-Reply-To: <2a45f1e1-39d5-76b3-8fd3-c1f8b288afac@quicinc.com>
Am 13.05.22 um 12:18 schrieb Charan Teja Kalla:
> On 5/13/2022 3:41 PM, Greg KH wrote:
>>> Reported-by: kernel test robot <lkp@intel.com>
>> The trest robot did not say that the dmabuf stat name was being
>> duplicated, did it?
>>
> It reported a printk warning on V2[1]. Should we remove this on V3?
We only add the kernel test robot is report when it found the underlying
problem and not just noted some warning on an intermediate patch version.
> @Christian: Could you please drop this tag while merging?
Sure, I don't have much on my plate at the moment. But don't let it
become a habit.
Going to push it upstream through drm-misc-fixes now.
Regards,
Christian.
>
> [1] https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Fall%2F202205110511.E0d8TXXC-lkp%40intel.com%2F&data=05%7C01%7Cchristian.koenig%40amd.com%7C00e38dfb74fb4fe48b8408da34c9ee77%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637880339170888363%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=yH%2FBg2Fjq2ohEFKLgw2CcYEeHiUfgPLlsJaRnt9cKLo%3D&reserved=0
>
>
>>> diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
>>> index a6fc96e..0ad5039 100644
>>> --- a/drivers/dma-buf/dma-buf.c
>>> +++ b/drivers/dma-buf/dma-buf.c
>>> @@ -407,6 +407,7 @@ static inline int is_dma_buf_file(struct file *file)
>>>
>>> static struct file *dma_buf_getfile(struct dma_buf *dmabuf, int flags)
>>> {
>>> + static atomic64_t dmabuf_inode = ATOMIC64_INIT(0);
>>> struct file *file;
>>> struct inode *inode = alloc_anon_inode(dma_buf_mnt->mnt_sb);
>>>
>>> @@ -416,6 +417,13 @@ static struct file *dma_buf_getfile(struct dma_buf *dmabuf, int flags)
>>> inode->i_size = dmabuf->size;
>>> inode_set_bytes(inode, dmabuf->size);
>>>
>>> + /*
>>> + * The ->i_ino acquired from get_next_ino() is not unique thus
>>> + * not suitable for using it as dentry name by dmabuf stats.
>>> + * Override ->i_ino with the unique and dmabuffs specific
>>> + * value.
>>> + */
>>> + inode->i_ino = atomic64_add_return(1, &dmabuf_inode);
>>> file = alloc_file_pseudo(inode, dma_buf_mnt, "dmabuf",
>>> flags, &dma_buf_fops);
>>> if (IS_ERR(file))
>>> --
>>> 2.7.4
>>>
>> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Thanks for the ACK.
>
> --Charan
next prev parent reply other threads:[~2022-05-13 10:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-13 9:38 Charan Teja Kalla
2022-05-13 10:11 ` Greg KH
2022-05-13 10:18 ` Charan Teja Kalla
2022-05-13 10:26 ` Greg KH
2022-05-13 10:29 ` Christian König [this message]
2022-05-13 10:38 ` Charan Teja Kalla
2022-05-13 10:42 ` 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=0071e117-1d91-b086-7cb1-976b2a1c3498@amd.com \
--to=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=quic_charante@quicinc.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®