Re: [PATCH] connector: improved unaligned access error fix

From: Pete Zaitcev
Date: Thu Nov 14 2013 - 14:46:13 EST


On Thu, 14 Nov 2013 12:09:21 -0500
Chris Metcalf <cmetcalf@xxxxxxxxxx> wrote:

> - __u8 buffer[CN_PROC_MSG_SIZE];
> + __u8 buffer[CN_PROC_MSG_SIZE] __aligned(8);

> - msg = (struct cn_msg *)buffer;
> + msg = buffer_to_cn_msg(buffer);
> ev = (struct proc_event *)msg->data;
> memset(&ev->event_data, 0, sizeof(ev->event_data));

Why is memset(buffer,0,CN_PROC_MSG_SIZE) not acceptable?

-- Pete
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/