[lkml]   [2003]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 2.4] i2c-dev user/kernel bug and mem leak
On Sun, Aug 17, 2003 at 05:54:36PM -0700, Robert T. Johnson wrote:
> On Fri, 2003-08-15 at 16:51, Greg KH wrote:
> > On Fri, Aug 15, 2003 at 03:17:25PM -0700, Robert T. Johnson wrote:
> > > For this particular bug (before all the patches started flying around),
> > > you'd have to add a kernel annotation to the "struct i2c_msg" field
> > > buf.
> >
> > Look at 2.6, that annotatation is already there.
> I just double-checked my copy of linux-2.6.0-test3, and I don't see it.
> Just to make sure we're talking about the same thing, I'm looking at
> include/linux/i2c.h:402, i.e. the definition of field buf in struct
> i2c_msg.
> Now I see you have the msgs field of i2c_rdwr_ioctl_arg annotated as
> __user. That should've generated a warning from sparse. Looks like a
> bug in sparse to me.

Hm, possibly. Again, it's the "holds two different things depending on
the code path" problem. No easy fix, even with annotation, except for
splitting the structures apart (which I recommend doing.)

> > Nice, is cqual released somewhere so that we can compare it and start
> > using it, like we already use sparse?
> I just discussed it with the other developers, and we'll work on getting
> a release out in the next week or so. It still has rough edges, but
> feedback from kernel developers like yourself will be invaluable.

Looking forward to it.


greg k-h
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:47    [W:0.096 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site