From: ext Russell King - ARM Linux <linux@xxxxxxxxxxxxxxxx> Subject: Re: [PATCH 02/10] OMAP: iommu: add initial debugfs support Date: Sun, 16 Aug 2009 22:47:32 +0200 > On Sun, Aug 16, 2009 at 06:13:55PM +0300, Tony Lindgren wrote: > > * Hiroshi DOYU <Hiroshi.DOYU@xxxxxxxxx> [090815 15:06]: > > > Hi Russell, > > > > > > From: ext Russell King - ARM Linux <linux@xxxxxxxxxxxxxxxx> > > > Subject: Re: [PATCH 02/10] OMAP: iommu: add initial debugfs support > > > Date: Thu, 13 Aug 2009 11:23:59 +0200 > > > > > > > On Wed, Aug 12, 2009 at 03:13:24PM +0300, Tony Lindgren wrote: > > > > > +static DEFINE_MUTEX(iommu_debug_lock); > > > > > +static char local_buffer[SZ_4K]; > > > > > > > > I don't like this - what if the data you're sprintf'ing into this > > > > buffer overflows it? > > > > > > Right. > > > > > > I have attached the updated version which limits max write counts to > > > avoid the above buffer overflow. > > > > Thanks, I've update my queue with it. > > I'm not sure the patch is correct yet. I think this update introduced > some bugs. Consider the debug_read_* functions and consider what > happens if count = 1 but ppos != 0. I think that "simple_read_from_buffer()" can take care of the above parameter checking? -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html