]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[CIFS] Fix endian conversion of vcnum field
authorSteve French <sfrench@us.ibm.com>
Fri, 1 May 2009 16:21:04 +0000 (16:21 +0000)
committerSteve French <sfrench@us.ibm.com>
Fri, 1 May 2009 16:25:15 +0000 (16:25 +0000)
When multiply mounting from the same client to the same server, with
different userids, we create a vcnum which should be unique if
possible (this is not the same as the smb uid, which is the handle
to the security context).  We were not endian converting additional
(beyond the first which is zero) vcnum properly.

CC: Stable <stable@kernel.org>
Acked-by: Shirish Pargaonkar <shirishp@us.ibm.com>
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/sess.c

index 2bcff17047abfa3c6ac1bf8422ec8698df5fcf54..b2bdc2a338338c8346ed576a6b0f0661e4a6ab88 100644 (file)
@@ -111,7 +111,7 @@ static __le16 get_next_vcnum(struct cifsSesInfo *ses)
 get_vc_num_exit:
        write_unlock(&cifs_tcp_ses_lock);
 
-       return le16_to_cpu(vcnum);
+       return cpu_to_le16(vcnum);
 }
 
 static __u32 cifs_ssetup_hdr(struct cifsSesInfo *ses, SESSION_SETUP_ANDX *pSMB)