lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:   Thu, 26 Jan 2017 16:00:36 +0300
From:   Serge Semin <fancer.lancer@...il.com>
To:     gregkh@...uxfoundation.org, julia.lawall@...6.fr
Cc:     Sergey.Semin@...latforms.ru, linux-kernel@...r.kernel.org,
        Serge Semin <fancer.lancer@...il.com>
Subject: [PATCH] eeprom: idt_89hpesx: Discard memory freeing allocated by devm_kmalloc

Indeed, the data structure is allocated by device resource manager,
so the driver doesn't need to free anything on remove() callback.

Reported-by: Julia Lawall <julia.lawall@...6.fr>
Signed-off-by: Serge Semin <fancer.lancer@...il.com>
---
 drivers/misc/eeprom/idt_89hpesx.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/misc/eeprom/idt_89hpesx.c b/drivers/misc/eeprom/idt_89hpesx.c
index 25d47d0..f73fd04 100644
--- a/drivers/misc/eeprom/idt_89hpesx.c
+++ b/drivers/misc/eeprom/idt_89hpesx.c
@@ -1227,9 +1227,6 @@ static void idt_free_pdev(struct idt_89hpesx_dev *pdev)
 {
 	/* Clear driver data from device private field */
 	i2c_set_clientdata(pdev->client, NULL);
-
-	/* Just free memory allocated for data */
-	devm_kfree(&pdev->client->dev, pdev);
 }
 
 /*
-- 
2.6.6

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ