From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761950AbZENWyq (ORCPT ); Thu, 14 May 2009 18:54:46 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756893AbZENWmr (ORCPT ); Thu, 14 May 2009 18:42:47 -0400 Received: from kroah.org ([198.145.64.141]:52573 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756719AbZENWm1 (ORCPT ); Thu, 14 May 2009 18:42:27 -0400 X-Mailbox-Line: From gregkh@mini.kroah.org Thu May 14 15:35:26 2009 Message-Id: <20090514223526.233786534@mini.kroah.org> User-Agent: quilt/0.48-1 Date: Thu, 14 May 2009 15:33:11 -0700 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , Willy Tarreau , Rodrigo Rubira Branco , Jake Edge , Eugene Teo , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Shirish Pargaonkar , Jeff Layton , Steve French Subject: [patch 36/51] CIFS: Fix endian conversion of vcnum field References: <20090514223235.348540705@mini.kroah.org> Content-Disposition: inline; filename=cifs-fix-endian-conversion-of-vcnum-field.patch In-Reply-To: <20090514223755.GA27019@kroah.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2.6.29-stable review patch. If anyone has any objections, please let us know. ------------------ From: Steve French commit 051a2a0d3242b448281376bb63cfa9385e0b6c68 upstream. 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. Acked-by: Shirish Pargaonkar Acked-by: Jeff Layton Signed-off-by: Steve French Signed-off-by: Greg Kroah-Hartman --- fs/cifs/sess.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/cifs/sess.c +++ b/fs/cifs/sess.c @@ -111,7 +111,7 @@ static __le16 get_next_vcnum(struct cifs 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)