- fdtable-delete-pointless-code-in-dup_fd.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     fdtable: Delete pointless code in dup_fd()

has been removed from the -mm tree.  Its filename is

     fdtable-delete-pointless-code-in-dup_fd.patch

This patch was dropped because an updated version will be merged

------------------------------------------------------
Subject: fdtable: Delete pointless code in dup_fd()
From: Vadim Lobanov <vlobanov@xxxxxxxxxxxxx>

The dup_fd() function creates a new files_struct and fdtable embedded inside
that files_struct, and then possibly expands the fdtable using expand_files().

The out_release error path is invoked when expand_files() returns an error
code.  However, when this attempt to expand fails, the fdtable is left in its
original embedded form, so it is pointless to try to free the associated
fdarray and fdsets.

Signed-off-by: Vadim Lobanov <vlobanov@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 kernel/fork.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff -puN kernel/fork.c~fdtable-delete-pointless-code-in-dup_fd kernel/fork.c
--- a/kernel/fork.c~fdtable-delete-pointless-code-in-dup_fd
+++ a/kernel/fork.c
@@ -727,14 +727,11 @@ static struct files_struct *dup_fd(struc
 		memset(&new_fdt->close_on_exec->fds_bits[start], 0, left);
 	}
 
-out:
 	return newf;
 
 out_release:
-	free_fdset (new_fdt->close_on_exec, new_fdt->max_fdset);
-	free_fdset (new_fdt->open_fds, new_fdt->max_fdset);
-	free_fd_array(new_fdt->fd, new_fdt->max_fds);
 	kmem_cache_free(files_cachep, newf);
+out:
 	return NULL;
 }
 
_

Patches currently in -mm which might be from vlobanov@xxxxxxxxxxxxx are

fdtable-make-fdarray-and-fdsets-equal-in-size-slim.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

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux