From: "H . J . Lu" <hjl@valinux.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] The 1117 snapshot alignment bug
Date: Thu, 11 Jan 2001 22:02:16 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590693005030@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590693005029@msgid-missing>
On Thu, Jan 11, 2001 at 01:26:01PM -0800, H . J . Lu wrote:
> I got a kernel unaligned access bug:
>
> The problem is
>
> struct bar x = { b->f4, 0, {0, 0} };
>
> gcc uses
>
> st8 [rX] = r0
>
> for {0, 0}. But st8 requires 8 byte aligment while
>
> unsigned int f6 [2];
>
> has 4 byte aligment.
>
> BTW, nfs3_proc_create in fs/nfs/nfs3proc.c got miscompiled.
>
Here is a workaround for the compiler bug.
---
--- linux/fs/nfs/nfs3proc.c.align Thu Jan 11 13:27:25 2001
+++ linux/fs/nfs/nfs3proc.c Thu Jan 11 13:40:59 2001
@@ -190,11 +190,17 @@ nfs3_proc_create(struct inode *dir, stru
int flags, struct nfs_fh *fhandle, struct nfs_fattr *fattr)
{
struct nfs_fattr dir_attr;
- struct nfs3_createargs arg = { NFS_FH(dir), name->name, name->len,
- sattr, 0, { 0, 0 } };
+ struct nfs3_createargs arg;
struct nfs3_diropres res = { &dir_attr, fhandle, fattr };
int status;
+ arg.fh = NFS_FH(dir);
+ arg.name = name->name;
+ arg.len = name->len,
+ arg.sattr = sattr;
+ arg.createmode = 0;
+ arg.verifier [0] = 0;
+ arg.verifier [1] = 0;
dprintk("NFS call create %s\n", name->name);
arg.createmode = NFS3_CREATE_UNCHECKED;
if (flags & O_EXCL) {
@@ -362,10 +368,17 @@ nfs3_proc_mkdir(struct inode *dir, struc
struct nfs_fh *fhandle, struct nfs_fattr *fattr)
{
struct nfs_fattr dir_attr;
- struct nfs3_createargs arg = { NFS_FH(dir), name->name, name->len,
- sattr, 0, { 0, 0 } };
+ struct nfs3_createargs arg;
struct nfs3_diropres res = { &dir_attr, fhandle, fattr };
int status;
+
+ arg.fh = NFS_FH(dir);
+ arg.name = name->name;
+ arg.len = name->len,
+ arg.sattr = sattr;
+ arg.createmode = 0;
+ arg.verifier [0] = 0;
+ arg.verifier [1] = 0;
dprintk("NFS call mkdir %s\n", name->name);
dir_attr.valid = 0;
next prev parent reply other threads:[~2001-01-11 22:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-11 21:26 [Linux-ia64] The 1117 snapshot alignment bug H . J . Lu
2001-01-11 22:02 ` H . J . Lu [this message]
2001-01-12 2:13 ` Jim Wilson
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=marc-linux-ia64-105590693005030@msgid-missing \
--to=hjl@valinux.com \
--cc=linux-ia64@vger.kernel.org \
/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.