Re: [PATCH] net: af_packet: Don't initialize vnet_hdr

From: David Miller
Date: Thu May 12 2011 - 17:26:45 EST


From: Joe Perches <joe@xxxxxxxxxxx>
Date: Thu, 12 May 2011 13:36:10 -0700

> Save a memset, initialize only the portion necessary.
>
> packet_snd either gets this structure completely from
> memcpy_fromiovec or uses only the hdr_len set to 0,
> so don't always initialize the structure to 0.
>
> Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>

On ARM this won't be tightly packed, therefore you'll leave
uninitialized pieces of padding in this structure and this
thing is an "on-the-wire" network header.

I'm not applying this.
--
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/