lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 4 Dec 2006 18:34:33 +0100
From:	Oliver Neukum <oliver@...kum.org>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	Maneesh Soni <maneesh@...ibm.com>, gregkh@...e.com,
	linux-usb-devel@...ts.sourceforge.net,
	kernel list <linux-kernel@...r.kernel.org>
Subject: Re: race in sysfs between sysfs_remove_file() and read()/write() #2

Am Montag, 4. Dezember 2006 17:57 schrieb Alan Stern:

> I was referring to sysfs_remove_file(), not sysfs_open_file() -- I agree 
> that getting rid of the check_perm() routine is good.  But this isn't:
> 
> >  void sysfs_remove_file(struct kobject * kobj, const struct attribute * attr)
> >  {
> > -       sysfs_hash_and_remove(kobj->dentry,attr->name);
> > +       struct dentry *d = kobj->dentry;
> > +
> > +       sysfs_hash_and_remove(d, attr->name);
> >  }
> 
> There's no apparent advantage to introducing the local variable d, either 
> in terms of execution speed or readability.  (Although the original source 
> line should have a space after the comma.)

Yes, correct, it is a remainder of using the dentry twice in that routine.
Then a local variable saved a recomputation. I can redo it, sorry.
However, it doesn't affect correctness, so I won't distract further by
doing an essentially cosmetic change.

	Regards
		Oliver
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists