]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/etnaviv: fix submit flags getting overwritten by BO content
authorLucas Stach <l.stach@pengutronix.de>
Tue, 27 Jun 2017 14:02:51 +0000 (16:02 +0200)
committerLucas Stach <l.stach@pengutronix.de>
Wed, 28 Jun 2017 08:35:46 +0000 (10:35 +0200)
The addition of the flags member to etnaviv_gem_submit structure didn't
take into account that the last member of this structure is a variable
length array.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
drivers/gpu/drm/etnaviv/etnaviv_gem.h

index c4a091e874269fd9ac79a025f9d37f250ac95520..e437fba1209d925cca7bf7f33b5651c3eeeda21a 100644 (file)
@@ -106,9 +106,10 @@ struct etnaviv_gem_submit {
        struct etnaviv_gpu *gpu;
        struct ww_acquire_ctx ticket;
        struct dma_fence *fence;
+       u32 flags;
        unsigned int nr_bos;
        struct etnaviv_gem_submit_bo bos[0];
-       u32 flags;
+       /* No new members here, the previous one is variable-length! */
 };
 
 int etnaviv_gem_wait_bo(struct etnaviv_gpu *gpu, struct drm_gem_object *obj,