The patch titled
Fix the memory leak Intel RNG driver
has been added to the -mm tree. Its filename is
use-stop_machine_run-in-the-intel-rng-driver-fix-the-memory-leak-intel-rng-driver.patch
*** Remember to use Documentation/SubmitChecklist when testing your code ***
See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this
------------------------------------------------------
Subject: Fix the memory leak Intel RNG driver
From: "Tomita, Haruo" <[EMAIL PROTECTED]>
This patch fixes a memory leak in mod_init().
In the error, intel_rng_hw was freed.
Cc: Prarit Bhargava <[EMAIL PROTECTED]>
Cc: Jan Beulich <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---
drivers/char/hw_random/intel-rng.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff -puN
drivers/char/hw_random/intel-rng.c~use-stop_machine_run-in-the-intel-rng-driver-fix-the-memory-leak-intel-rng-driver
drivers/char/hw_random/intel-rng.c
---
a/drivers/char/hw_random/intel-rng.c~use-stop_machine_run-in-the-intel-rng-driver-fix-the-memory-leak-intel-rng-driver
+++ a/drivers/char/hw_random/intel-rng.c
@@ -345,11 +345,11 @@ static int __init mod_init(void)
}
err = intel_init_hw_struct(intel_rng_hw, dev);
- if (err == -ENODEV) {
- pci_dev_put(dev);
- goto fwh_done;
- } else if (err < 0) {
+ if (err) {
pci_dev_put(dev);
+ kfree(intel_rng_hw);
+ if (err == -ENODEV)
+ goto fwh_done;
goto out;
}
_
Patches currently in -mm which might be from [EMAIL PROTECTED] are
use-stop_machine_run-in-the-intel-rng-driver-fix.patch
use-stop_machine_run-in-the-intel-rng-driver-fix-the-memory-leak-intel-rng-driver.patch
-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html