Re: [PATCH v5 0/8] xen: dma-buf support for grant device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/23/2018 06:22 PM, Boris Ostrovsky wrote:
On 07/23/2018 09:26 AM, Oleksandr Andrushchenko wrote:
On 07/23/2018 11:38 AM, Oleksandr Andrushchenko wrote:
data/upstream/linux-xen/drivers/xen/gntdev-dmabuf.c: In function
‘gntdev_ioctl_dmabuf_exp_from_refs’:
/data/upstream/linux-xen/drivers/xen/gntdev-dmabuf.c:503:6: warning:
‘args.fd’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
    *fd = args.fd;
    ~~~~^~~~~~~~~
/data/upstream/linux-xen/drivers/xen/gntdev-dmabuf.c:467:35: note:
‘args.fd’ was declared here
    struct gntdev_dmabuf_export_args args;
                                     ^~~~
Strangely, but my i386 build goes smooth.
Which version of gcc you use and could you please give me your
.config, so I can test the same?
Now I see this warning which seems to be a false positive.
Boris, could you please apply the following:

diff --git a/drivers/xen/gntdev-dmabuf.c b/drivers/xen/gntdev-dmabuf.c
index e4c9f1f74476..0680dbcba616 100644
--- a/drivers/xen/gntdev-dmabuf.c
+++ b/drivers/xen/gntdev-dmabuf.c
@@ -495,6 +495,7 @@ static int dmabuf_exp_from_refs(struct gntdev_priv
*priv, int flags,
         args.dmabuf_priv = priv->dmabuf_priv;
         args.count = map->count;
         args.pages = map->pages;
+       args.fd = -1;

         ret = dmabuf_exp_from_pages(&args);
         if (ret < 0)

or please let me know if you want me to resend with this fix?

Missed this message. Yes, this obviously fixes the problem. And it is
due to the code fragment that I mentioned in the earlier response.

Which patch is this for? I can add this when committing.
Thank you, this is for "[PATCH v5 7/8] xen/gntdev: Implement dma-buf export functionality"
-boris
Thank you,
Oleksandr
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux