[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190820101653.74738-2-alexander.shishkin@linux.intel.com>
Date: Tue, 20 Aug 2019 13:16:50 +0300
From: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-kernel@...r.kernel.org,
Ding Xiang <dingxiang@...s.chinamobile.com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
stable@...r.kernel.org
Subject: [GIT PULL 1/4] stm class: Fix a double free of stm_source_device
From: Ding Xiang <dingxiang@...s.chinamobile.com>
In the error path of stm_source_register_device(), the kfree is
unnecessary, as the put_device() before it ends up calling
stm_source_device_release() to free stm_source_device, leading to
a double free at the outer kfree() call. Remove it.
Signed-off-by: Ding Xiang <dingxiang@...s.chinamobile.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Fixes: 7bd1d4093c2fa ("stm class: Introduce an abstraction for System Trace Module devices")
Link: https://lore.kernel.org/linux-arm-kernel/1563354988-23826-1-git-send-email-dingxiang@cmss.chinamobile.com/
Cc: stable@...r.kernel.org # v4.4+
---
drivers/hwtracing/stm/core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/hwtracing/stm/core.c b/drivers/hwtracing/stm/core.c
index e55b902560de..181e7ff1ec4f 100644
--- a/drivers/hwtracing/stm/core.c
+++ b/drivers/hwtracing/stm/core.c
@@ -1276,7 +1276,6 @@ int stm_source_register_device(struct device *parent,
err:
put_device(&src->dev);
- kfree(src);
return err;
}
--
2.23.0.rc1
Powered by blists - more mailing lists