This is a note to let you know that I've just added the patch titled

    tools/hv: Fix file handle leak

to the 3.4-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     tools-hv-fix-file-handle-leak.patch
and it can be found in the queue-3.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From d5ab482799e7c4c4b7c0aa67e8710dce28115d03 Mon Sep 17 00:00:00 2001
From: Ben Hutchings <[email protected]>
Date: Wed, 5 Sep 2012 14:37:35 -0700
Subject: tools/hv: Fix file handle leak

From: Ben Hutchings <[email protected]>

commit d5ab482799e7c4c4b7c0aa67e8710dce28115d03 upstream.

Match up each fopen() with an fclose().

Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 tools/hv/hv_kvp_daemon.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/tools/hv/hv_kvp_daemon.c
+++ b/tools/hv/hv_kvp_daemon.c
@@ -144,7 +144,7 @@ static void kvp_update_file(int pool)
                                sizeof(struct kvp_record),
                                kvp_file_info[pool].num_records, filep);
 
-       fflush(filep);
+       fclose(filep);
        kvp_release_lock(pool);
 }
 
@@ -191,6 +191,7 @@ static void kvp_update_mem_state(int poo
        kvp_file_info[pool].records = record;
        kvp_file_info[pool].num_records = records_read;
 
+       fclose(filep);
        kvp_release_lock(pool);
 }
 static int kvp_file_init(void)


Patches currently in stable-queue which might be from [email protected] are

queue-3.4/staging-speakup_soft-fix-reading-of-init-string.patch
queue-3.4/tools-hv-check-for-read-write-errors.patch
queue-3.4/tools-hv-fix-file-handle-leak.patch
queue-3.4/tools-hv-fix-exit-error-code.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to