All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: urban@teststation.com
Cc: samba@samba.org, linux-kernel@vger.kernel.org,
	macro@linux-mips.org, marcelo.tosatti@cyclades.com
Subject: [patch] fs/smbfs/proc.c: fix data corruption in smb_proc_setattr_unix()
Date: Sun, 18 Dec 2005 21:06:59 +0100	[thread overview]
Message-ID: <20051218200659.GL23349@stusta.de> (raw)

From: Maciej W. Rozycki <macro@linux-mips.org>


This patch fixes a data corruption in smb_proc_setattr_unix() 
(smb_filetype_from_mode() returns an u32, and there are only four bytes 
reserved for it in data.

Signed-off-by: Adrian Bunk <bunk@stusta.de>


--- linux-2.6.14-rc3-git3/fs/smbfs/proc.c	2005-10-04 19:24:37.000000000 +1000
+++ .6877.trivial/fs/smbfs/proc.c	2005-10-04 19:29:50.000000000 +1000
@@ -3113,7 +3113,7 @@ smb_proc_setattr_unix(struct dentry *d, 
 	LSET(data, 32, SMB_TIME_NO_CHANGE);
 	LSET(data, 40, SMB_UID_NO_CHANGE);
 	LSET(data, 48, SMB_GID_NO_CHANGE);
-	LSET(data, 56, smb_filetype_from_mode(attr->ia_mode));
+	DSET(data, 56, smb_filetype_from_mode(attr->ia_mode));
 	LSET(data, 60, major);
 	LSET(data, 68, minor);
 	LSET(data, 76, 0);


                 reply	other threads:[~2005-12-18 20:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051218200659.GL23349@stusta.de \
    --to=bunk@stusta.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=macro@linux-mips.org \
    --cc=marcelo.tosatti@cyclades.com \
    --cc=samba@samba.org \
    --cc=urban@teststation.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.