From: Al Viro <viro@ftp.linux.org.uk>
To: Markus Lidel <Markus.Lidel@shadowconnect.com>
Cc: "David S. Miller" <davem@davemloft.net>,
alan@lxorguk.ukuu.org.uk, akpm@osdl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/5] I2O: SPARC fixes
Date: Sun, 20 Nov 2005 23:07:14 +0000 [thread overview]
Message-ID: <20051120230714.GD27946@ftp.linux.org.uk> (raw)
In-Reply-To: <20051120225256.GC27946@ftp.linux.org.uk>
And here's another fun one:
evt->size = size;
evt->tcntxt = le32_to_cpu(msg->u.s.tcntxt);
evt->event_indicator = le32_to_cpu(msg->body[0]);
memcpy(&evt->tcntxt, &msg->u.s.tcntxt, size * 4);
in i2o_driver_dispatch().
We have
struct i2o_event {
struct work_struct work;
struct i2o_device *i2o_dev; /* I2O device pointer from which the
event reply was initiated */
u16 size; /* Size of data in 32-bit words */
u32 tcntxt; /* Transaction context used at
registration */
u32 event_indicator; /* Event indicator from reply */
u32 data[0]; /* Event data from reply */
};
and
in msg tcntxt goes right before body[0]. So we copy two 32bit values
converting to host order and then immediately overwrite them with
unconverted ones.
Looks like these assignments were meant to go *after* memcpy() and
serve as a fixup...
next prev parent reply other threads:[~2005-11-20 23:07 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-15 9:31 [PATCH 2/5] I2O: SPARC fixes Markus Lidel
2005-11-15 21:28 ` David S. Miller
2005-11-16 12:25 ` Markus Lidel
2005-11-16 19:18 ` David S. Miller
2005-11-17 8:12 ` Markus Lidel
2005-11-19 1:07 ` Markus Lidel
2005-11-19 1:22 ` David S. Miller
2005-11-19 3:30 ` Alan Cox
2005-11-19 4:37 ` David S. Miller
2005-11-19 13:18 ` Alan Cox
2005-11-20 21:38 ` Markus Lidel
2005-11-20 21:42 ` Markus Lidel
2005-11-20 22:52 ` Al Viro
2005-11-20 23:07 ` Al Viro [this message]
2005-11-20 23:21 ` Al Viro
2005-11-21 0:48 ` Markus Lidel
2005-11-21 1:20 ` Al Viro
2005-11-21 3:38 ` Al Viro
2005-11-21 8:46 ` Markus Lidel
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=20051120230714.GD27946@ftp.linux.org.uk \
--to=viro@ftp.linux.org.uk \
--cc=Markus.Lidel@shadowconnect.com \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=davem@davemloft.net \
--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 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.