> >> -static void module_remove_modinfo_attrs(struct module *mod)
> >> +static void module_remove_modinfo_attrs(struct module *mod, int end)
> >>  {
> >>    struct module_attribute *attr;
> >>    int i;
> >>  
> >>    for (i = 0; (attr = &mod->modinfo_attrs[i]); i++) {
> >> +          if (end >= 0 && i > end)
> >> +                  break;
> > 
> > If end == 0, you break the loop without calling sysfs_remove_file(), which 
> > is a bug if you called module_remove_modinfo_attrs(mod, 0).
> 
> If end == 0 and i == 0, if statement is false, it won't break the loop.

Eh, you're right of course.

Miroslav

Reply via email to