+ drivers-gpu-drm-vmwgfx-memory-leaks-caused-by-double-allocation.patch added to -mm tree

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

 



The patch titled
     Subject: drivers/gpu/drm/vmwgfx: memory leaks caused by double allocation
has been added to the -mm tree.  Its filename is
     drivers-gpu-drm-vmwgfx-memory-leaks-caused-by-double-allocation.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
From: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Subject: drivers/gpu/drm/vmwgfx: memory leaks caused by double allocation

These variables get allocated twice so the first allocation is a memory
leak.

Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Cc: David Airlie <airlied@xxxxxxxx>
Reviewed-by: Thomas Hellstrom <thellstrom@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c    |    3 +--
 drivers/gpu/drm/vmwgfx/vmwgfx_resource.c |    3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff -puN drivers/gpu/drm/vmwgfx/vmwgfx_fence.c~drivers-gpu-drm-vmwgfx-memory-leaks-caused-by-double-allocation drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c~drivers-gpu-drm-vmwgfx-memory-leaks-caused-by-double-allocation
+++ a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
@@ -953,8 +953,7 @@ int vmw_event_fence_action_create(struct
 				  uint32_t *tv_usec,
 				  bool interruptible)
 {
-	struct vmw_event_fence_action *eaction =
-		kzalloc(sizeof(*eaction), GFP_KERNEL);
+	struct vmw_event_fence_action *eaction;
 	struct ttm_mem_global *mem_glob =
 		vmw_mem_glob(fence->fman->dev_priv);
 	struct vmw_fence_manager *fman = fence->fman;
diff -puN drivers/gpu/drm/vmwgfx/vmwgfx_resource.c~drivers-gpu-drm-vmwgfx-memory-leaks-caused-by-double-allocation drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c~drivers-gpu-drm-vmwgfx-memory-leaks-caused-by-double-allocation
+++ a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
@@ -1255,8 +1255,7 @@ int vmw_surface_define_ioctl(struct drm_
 			     struct drm_file *file_priv)
 {
 	struct vmw_private *dev_priv = vmw_priv(dev);
-	struct vmw_user_surface *user_srf =
-	    kmalloc(sizeof(*user_srf), GFP_KERNEL);
+	struct vmw_user_surface *user_srf;
 	struct vmw_surface *srf;
 	struct vmw_resource *res;
 	struct vmw_resource *tmp;
_
Subject: Subject: drivers/gpu/drm/vmwgfx: memory leaks caused by double allocation

Patches currently in -mm which might be from dan.carpenter@xxxxxxxxxx are

linux-next.patch
memory-hotplug-release-lock-on-an-error-path.patch
drivers-gpu-drm-vmwgfx-memory-leaks-caused-by-double-allocation.patch
bio-change-some-signed-vars-to-unsigned.patch
paride-fix-potential-information-leak-in-pg_read.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux