On Thu, 2007-12-13 at 08:12 -0500, Ingo Molnar wrote:
>
> * Dhaval Giani <[email protected]> wrote:
>
> > > > static void user_attr_init(struct subsys_attribute *sa, char
> *name, int mode)
> > > > {
> > > > + sa->attr.owner = NULL;
> > > > sa->attr.name = name;
> > >
> > > i'm wondering why doesnt this affect 2.6.23 and later? Does sysfs
> > > initialize the owner field to NULL automatically?
> > >
> >
> > Going through git log, it seems that commit
> > 7b595756ec1f49e0049a9e01a1298d53a7faaa15 deemed attribute->owner as
> > unnecessary. I guess that answers the question.
>
> thx. The only open question seems to be: Vincent had sysfs crashes
> without the CFS patchset as well.
>
> Wouldnt it be prudent to backport the core bits of the above commit
> (attached below), to make sure the owner field is never utilized.
> (because it seems it's so easy and common to not maintain it properly)
>
> Vincent, does the patch below resolve the non-CFS crashes?
I was about to test but it does not apply on a 2.6.22:
[root@printemps linux-2.6.22.15-rc1-patched]# patch -p1
< ../make_sure_owner_field_is_never_utilized.patch
patching file fs/sysfs/bin.c
Hunk #1 FAILED at 175.
Hunk #2 FAILED at 198.
Hunk #3 FAILED at 207.
3 out of 3 hunks FAILED -- saving rejects to file fs/sysfs/bin.c.rej
patching file fs/sysfs/file.c
Hunk #1 FAILED at 241.
Hunk #2 FAILED at 250.
Hunk #3 FAILED at 266.
Hunk #4 FAILED at 274.
Hunk #5 FAILED at 283.
Hunk #6 FAILED at 292.
Hunk #7 FAILED at 304.
Hunk #8 FAILED at 312.
8 out of 8 hunks FAILED -- saving rejects to file fs/sysfs/file.c.rej
I was about to backport it but I find it's not that trivial... Help
would be appreciated.
- vin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]