mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Richard Curnow <Richard.Curnow@superh.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: struct nfs_fattr alignment problem in nfs3proc.c
Date: 22 Mar 2003 12:00:16 +0100	[thread overview]
Message-ID: <shs7karzmwv.fsf@charged.uio.no> (raw)
In-Reply-To: <20030321175206.GA17163@malvern.uk.w2k.superh.com>

>>>>> " " == Richard Curnow <Richard.Curnow@superh.com> writes:

     > In the nfs3_proc_unlink_setup function, there appears to be a
     > bug with the way kmalloc is used to allocate storage for two
     > structs grouped together.  The second struct ends up with a non
     > 8-byte aligned pointer, which can cause trouble later (in
     > xdr_decode_fattr) when stores occur to the u64 fields inside
     > it.  The following patch (on 2.4.19) fixes this problem, though
     > I'm not sure if it's the cleanest fix.  (I hit this when
     > working on the port to SH-5, which is currently baselined on
     > 2.4.19).

Why not just define

struct {
        struct nfs3_diropargs   arg;
        struct nfs_fattr        res;
} unlinkxdr;

and then kmalloc that?

Cheers,
  Trond

  reply	other threads:[~2003-03-22 10:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-21 17:52 Richard Curnow
2003-03-22 11:00 ` Trond Myklebust [this message]
2003-03-24 12:09   ` Richard Curnow
2003-03-24 13:49     ` Richard Curnow
2003-03-24 14:06       ` Trond Myklebust
2003-03-24 14:21         ` Richard Curnow

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=shs7karzmwv.fsf@charged.uio.no \
    --to=trond.myklebust@fys.uio.no \
    --cc=Richard.Curnow@superh.com \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®