diff options
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.23/0019-dm-persistent-data-fix-shadow_info_leak-on-dm_tm_des.patch')
-rw-r--r-- | recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.23/0019-dm-persistent-data-fix-shadow_info_leak-on-dm_tm_des.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.23/0019-dm-persistent-data-fix-shadow_info_leak-on-dm_tm_des.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.23/0019-dm-persistent-data-fix-shadow_info_leak-on-dm_tm_des.patch new file mode 100644 index 00000000..9ac2fb56 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.23/0019-dm-persistent-data-fix-shadow_info_leak-on-dm_tm_des.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From 97bbf28874e2f7467c0d05db53041e556488087a Mon Sep 17 00:00:00 2001 | ||
2 | From: Mike Snitzer <snitzer@redhat.com> | ||
3 | Date: Tue, 3 Jul 2012 12:55:33 +0100 | ||
4 | Subject: [PATCH 19/49] dm persistent data: fix shadow_info_leak on | ||
5 | dm_tm_destroy | ||
6 | |||
7 | commit 25d7cd6faa7ae6ed2565617c3ee2500ccb8a9f7f upstream. | ||
8 | |||
9 | Cleanup the shadow table before destroying the transaction manager. | ||
10 | |||
11 | Reference: leak was identified with kmemleak when running | ||
12 | test_discard_random_sectors in the thinp-test-suite. | ||
13 | |||
14 | Signed-off-by: Mike Snitzer <snitzer@redhat.com> | ||
15 | Signed-off-by: Alasdair G Kergon <agk@redhat.com> | ||
16 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
17 | --- | ||
18 | drivers/md/persistent-data/dm-transaction-manager.c | 3 +++ | ||
19 | 1 file changed, 3 insertions(+) | ||
20 | |||
21 | diff --git a/drivers/md/persistent-data/dm-transaction-manager.c b/drivers/md/persistent-data/dm-transaction-manager.c | ||
22 | index 6f8d387..e5902d1 100644 | ||
23 | --- a/drivers/md/persistent-data/dm-transaction-manager.c | ||
24 | +++ b/drivers/md/persistent-data/dm-transaction-manager.c | ||
25 | @@ -138,6 +138,9 @@ EXPORT_SYMBOL_GPL(dm_tm_create_non_blocking_clone); | ||
26 | |||
27 | void dm_tm_destroy(struct dm_transaction_manager *tm) | ||
28 | { | ||
29 | + if (!tm->is_clone) | ||
30 | + wipe_shadow_table(tm); | ||
31 | + | ||
32 | kfree(tm); | ||
33 | } | ||
34 | EXPORT_SYMBOL_GPL(dm_tm_destroy); | ||
35 | -- | ||
36 | 1.7.10 | ||
37 | |||