Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4e7aba73f9f6e9fe6d3fa10d3fd63cd4882ba3d0 Commit: 4e7aba73f9f6e9fe6d3fa10d3fd63cd4882ba3d0 Parent: 0ab823db869f1c9454c5b031a9b8f8812ccd0aa7 Author: Mike Christie <[EMAIL PROTECTED]> AuthorDate: Wed May 30 12:57:23 2007 -0500 Committer: James Bottomley <[EMAIL PROTECTED]> CommitDate: Sat Jun 2 15:36:46 2007 -0400
[SCSI] iscsi_tcp: fix fd leak This patch should fix the file descriptor leak problem. A quick look through the kernel shows that users of sockfd_lookup use sockfd_put to release their handle. We were using sock_release which from the comments and code look like it does not release the get() on the file from the lookup. Signed-off-by: Mike Christie <[EMAIL PROTECTED]> Signed-off-by: James Bottomley <[EMAIL PROTECTED]> --- drivers/scsi/iscsi_tcp.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index 4e9f0d9..7ce177e 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c @@ -29,6 +29,7 @@ #include <linux/types.h> #include <linux/list.h> #include <linux/inet.h> +#include <linux/file.h> #include <linux/blkdev.h> #include <linux/crypto.h> #include <linux/delay.h> @@ -1878,7 +1879,7 @@ iscsi_tcp_release_conn(struct iscsi_conn *conn) iscsi_conn_restore_callbacks(tcp_conn); sock_put(tcp_conn->sock->sk); - sock_release(tcp_conn->sock); + sockfd_put(tcp_conn->sock); tcp_conn->sock = NULL; conn->recv_lock = NULL; } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html