On Fri, 27 May 2011, Masao Uebayashi wrote: > On Thu, May 26, 2011 at 8:24 PM, Iain Hibbert <plu...@rya-online.net> wrote: > > On Thu, 26 May 2011, Masao Uebayashi wrote: > > > >> On Thu, May 26, 2011 at 5:39 PM, Iain Hibbert <plu...@rya-online.net> > >> wrote: > >> > On Thu, 26 May 2011, Masao Uebayashi wrote: > >> >> - I can't think of how cfdriver decls can lead to type inconsistency > >> >> bugs. > >> > > >> > Ok, somebody makes a mistake and writes > >> > > >> > extern struct cfdata foo_cd; > >> > > >> > and it works by chance because the address was zero anyway, then later > >> > something else is changed around and all of a sudden, an innocent code > >> > causes a kernel panic.. > >> > >> cfdriver must exist for either embedded/module forms. If not, it > >> should cause link error (if I'm not missing anything). > > > > Of course, it would exist.. that is the bug > > > > file a: /* generated by config(1) */ > > struct cfdriver foo_cd; > > > > file b: /* generated by an inattentive programmer */ > > extern struct cfdata foo_cd; > > I see. Let's fix hundreds of these instances now.
well, it is hypothetical of course - you wrote "I can't think of how cfdriver decls can lead to type inconsistency bugs." and I have shown you one pretty obvious way in which that can happen.. iain