The patch titled uml: close file descriptor leaks has been removed from the -mm tree. Its filename is uml-close-file-descriptor-leaks.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ Subject: uml: close file descriptor leaks From: Jeff Dike <jdike@xxxxxxxxxxx> Close two file descriptor leaks, one in the ubd driver and one to /proc/mounts. The ubd driver bug also leaked some vmalloc space. The /proc/mounts leak was a descriptor that was just never closed. Signed-off-by: Jeff Dike <jdike@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- arch/um/drivers/ubd_kern.c | 9 ++------- arch/um/os-Linux/mem.c | 6 +++++- 2 files changed, 7 insertions(+), 8 deletions(-) diff -puN arch/um/drivers/ubd_kern.c~uml-close-file-descriptor-leaks arch/um/drivers/ubd_kern.c --- a/arch/um/drivers/ubd_kern.c~uml-close-file-descriptor-leaks +++ a/arch/um/drivers/ubd_kern.c @@ -668,18 +668,15 @@ static int ubd_add(int n) if(dev->file == NULL) goto out; - if (ubd_open_dev(dev)) - goto out; - err = ubd_file_size(dev, &dev->size); if(err < 0) - goto out_close; + goto out; dev->size = ROUND_BLOCK(dev->size); err = ubd_new_disk(MAJOR_NR, dev->size, n, &ubd_gendisk[n]); if(err) - goto out_close; + goto out; if(fake_major != MAJOR_NR) ubd_new_disk(fake_major, dev->size, n, @@ -691,8 +688,6 @@ static int ubd_add(int n) make_ide_entries(ubd_gendisk[n]->disk_name); err = 0; -out_close: - ubd_close(dev); out: return err; } diff -puN arch/um/os-Linux/mem.c~uml-close-file-descriptor-leaks arch/um/os-Linux/mem.c --- a/arch/um/os-Linux/mem.c~uml-close-file-descriptor-leaks +++ a/arch/um/os-Linux/mem.c @@ -132,6 +132,9 @@ err: else if(found < 0) printf("read returned errno %d\n", -found); +out: + close(fd); + return; found: @@ -141,11 +144,12 @@ found: if(strncmp(buf, "tmpfs", strlen("tmpfs"))){ printf("not tmpfs\n"); - return; + goto out; } printf("OK\n"); default_tmpdir = "/dev/shm"; + goto out; } /* _ Patches currently in -mm which might be from jdike@xxxxxxxxxxx are origin.patch kill-wall_jiffies.patch const-struct-tty_operations.patch namespaces-utsname-switch-to-using-uts-namespaces.patch introduce-kernel_execve.patch rename-the-provided-execve-functions-to-kernel_execve.patch provide-kernel_execve-on-all-architectures.patch provide-kernel_execve-on-all-architectures-fix.patch remove-the-use-of-_syscallx-macros-in-uml.patch sh64-remove-the-use-of-kernel-syscalls.patch remove-remaining-errno-and-__kernel_syscalls__-references.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html