netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@hp.com>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH] sys_sendmsg() alignment bug fix
Date: Mon, 26 Sep 2005 14:02:01 -0600	[thread overview]
Message-ID: <1127764921.6529.60.camel@tdi> (raw)

   The patch below adds an alignment attribute to the buffer used in
sys_sendmsg().  This eliminates an unaligned access warning on ia64.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>

diff -r db9b9552a2b4 net/socket.c
--- a/net/socket.c	Sat Sep 24 23:56:08 2005
+++ b/net/socket.c	Mon Sep 26 13:44:09 2005
@@ -1700,7 +1700,9 @@
 	struct socket *sock;
 	char address[MAX_SOCK_ADDR];
 	struct iovec iovstack[UIO_FASTIOV], *iov = iovstack;
-	unsigned char ctl[sizeof(struct cmsghdr) + 20];	/* 20 is size of ipv6_pktinfo */
+	unsigned char ctl[sizeof(struct cmsghdr) + 20]
+	                  __attribute__ ((aligned (sizeof(__kernel_size_t))));
+	                  /* 20 is size of ipv6_pktinfo */
 	unsigned char *ctl_buf = ctl;
 	struct msghdr msg_sys;
 	int err, ctl_len, iov_size, total_len;

             reply	other threads:[~2005-09-26 20:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-26 20:02 Alex Williamson [this message]
2005-09-26 20:36 ` [PATCH] sys_sendmsg() alignment bug fix Andrew Morton
2005-09-26 21:28   ` David S. Miller
2005-09-27  3:40 ` Coywolf Qi Hunt
2005-09-27  3:59   ` Alex Williamson
2005-09-27  4:50   ` David S. Miller

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=1127764921.6529.60.camel@tdi \
    --to=alex.williamson@hp.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@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;
as well as URLs for NNTP newsgroup(s).