public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* MTD pointer alignment
@ 2006-11-29  0:09 Gavin Lambert
  2006-12-01  8:18 ` Artem Bityutskiy
  0 siblings, 1 reply; 5+ messages in thread
From: Gavin Lambert @ 2006-11-29  0:09 UTC (permalink / raw)
  To: linux-mtd

Given that mtdchar assumes that it can mess with the low 2 bits of the
MTD pointer it keeps around with impunity, add_mtd_device in mtdcore.c
should probably refuse to add any MTD device pointer that doesn't fall
on a 4-byte boundary.

As of kernel 2.6.15, at least, it happily adds it, leading to much
weirdness if the pointer wasn't actually aligned that way (which can
happen if it's embedded in a structure -- since struct mtd_info starts
with a byte-sized field then by default the structure as a whole is
allowed to be byte aligned).

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-12-04 21:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-29  0:09 MTD pointer alignment Gavin Lambert
2006-12-01  8:18 ` Artem Bityutskiy
2006-12-03 21:43   ` Gavin Lambert
2006-12-04 13:37     ` David Woodhouse
2006-12-04 21:11       ` Gavin Lambert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox