lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 19 Mar 2008 18:11:14 -0700
From:	Joe Perches <joe@...ches.com>
To:	linux-kernel@...r.kernel.org
Cc:	Steve French <sfrench@...ba.org>,
	linux-cifs-client@...ts.samba.org, samba-technical@...ts.samba.org
Subject: [PATCH 3/4] fs/cifs - Remove an indent level, use normal kthread_run arguments


Signed-off-by: Joe Perches <joe@...ches.com>
---
 fs/cifs/connect.c |   54 +++++++++++++++++++++++++---------------------------
 1 files changed, 26 insertions(+), 28 deletions(-)

diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 7c0e1ac..ca16fdc 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -330,8 +330,9 @@ static int coalesce_t2(struct smb_hdr *psecond, struct smb_hdr *pTargetSMB)
 }
 
 static int
-cifs_demultiplex_thread(struct TCP_Server_Info *server)
+cifs_demultiplex_thread(void *data);
 {
+	struct TCP_Server_Info *server = data;
 	int length;
 	unsigned int pdu_length, total_read;
 	struct smb_hdr *smb_buffer = NULL;
@@ -1367,35 +1368,31 @@ find_unc(__be32 new_target_ip_addr, char *uncName, char *userName)
 	list_for_each(tmp, &GlobalTreeConnectionList) {
 		cFYI(1, ("Next tcon"));
 		tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList);
-		if (tcon->ses) {
-			if (tcon->ses->server) {
-				cFYI(1,
-				     ("old ip addr: %x == new ip %x ?",
-				      tcon->ses->server->addr.sockAddr.sin_addr.
-				      s_addr, new_target_ip_addr));
-				if (tcon->ses->server->addr.sockAddr.sin_addr.
-				    s_addr == new_target_ip_addr) {
+		if (tcon->ses && tcon->ses->server) {
+			cFYI(1,
+			     ("old ip addr: %x == new ip %x ?",
+			      tcon->ses->server->addr.sockAddr.sin_addr.s_addr,
+			      new_target_ip_addr));
+			if (tcon->ses->server->addr.sockAddr.sin_addr.s_addr ==
+			    new_target_ip_addr) {
 	/* BB lock tcon, server and tcp session and increment use count here? */
-					/* found a match on the TCP session */
-					/* BB check if reconnection needed */
+				/* found a match on the TCP session */
+				/* BB check if reconnection needed */
+				cFYI(1,
+				     ("IP match, old UNC: %s new: %s",
+				      tcon->treeName, uncName));
+				if (strncmp(tcon->treeName, uncName,
+					    MAX_TREE_SIZE) == 0) {
 					cFYI(1,
-					      ("IP match, old UNC: %s new: %s",
+					     ("and old usr: %s new: %s",
 					      tcon->treeName, uncName));
-					if (strncmp
-					    (tcon->treeName, uncName,
-					     MAX_TREE_SIZE) == 0) {
-						cFYI(1,
-						     ("and old usr: %s new: %s",
-						      tcon->treeName, uncName));
-						if (strncmp
-						    (tcon->ses->userName,
-						     userName,
-						     MAX_USERNAME_SIZE) == 0) {
-							read_unlock(&GlobalSMBSeslock);
-							/* matched smb session
-							(user name */
-							return tcon;
-						}
+					if (strncmp(tcon->ses->userName,
+						    userName,
+						    MAX_USERNAME_SIZE) == 0) {
+						read_unlock(&GlobalSMBSeslock);
+						/* matched smb session
+						   (user name */
+						return tcon;
 					}
 				}
 			}
@@ -1973,7 +1970,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
 			so no need to spinlock this init of tcpStatus */
 			srvTcp->tcpStatus = CifsNew;
 			init_MUTEX(&srvTcp->tcpSem);
-			srvTcp->tsk = kthread_run((void *)(void *)cifs_demultiplex_thread, srvTcp, "cifsd");
+			srvTcp->tsk = kthread_run(cifs_demultiplex_thread,
+						  srvTcp, "cifsd");
 			if (IS_ERR(srvTcp->tsk)) {
 				rc = PTR_ERR(srvTcp->tsk);
 				cERROR(1, ("error %d create cifsd thread", rc));
-- 
1.5.4.rc2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists