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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 15 May 2008 03:00:54 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	cornelia.huck@...ibm.com
Cc:	shemminger@...tta.com, greg@...ah.com, fubar@...ibm.com,
	netdev@...r.kernel.org, bonding-devel@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] sysfs: remove error messages for -EEXIST case

From: Cornelia Huck <cornelia.huck@...ibm.com>
Date: Thu, 15 May 2008 11:31:31 +0200

> On Thu, 15 May 2008 01:01:39 -0700 (PDT),
> David Miller <davem@...emloft.net> wrote:
> 
> > From: Cornelia Huck <cornelia.huck@...ibm.com>
> > Date: Thu, 15 May 2008 09:52:46 +0200
> > 
> > > >  int sysfs_add_one(struct sysfs_addrm_cxt *acxt, struct sysfs_dirent *sd)
> > > >  {
> > > > -	if (sysfs_find_dirent(acxt->parent_sd, sd->s_name)) {
> > > > -		printk(KERN_WARNING "sysfs: duplicate filename '%s' "
> > > > -		       "can not be created\n", sd->s_name);
> > > > -		WARN_ON(1);
> > > > +	if (sysfs_find_dirent(acxt->parent_sd, sd->s_name))
> > > >  		return -EEXIST;
> > > > -	}
> > > > 
> > > >  	sd->s_parent = sysfs_get(acxt->parent_sd);
> > > 
> > > ...but this will cause many useful warnings to disappear.
> > > 
> > > What to do here?
> > 
> > Make a __sysfs_add_one() that doesn't warn.   Make
> > sysfs_add_one() be a wrapper around __sysfs_add_one()
> > that warns.
> > 
> > Change networking to call __sysfs_add_one().
> 
> Like this (not even compile tested)?

No, the idea is that the __sysfs_add_one() wouldn't need a parameter
at all.  sysfs_add_one() just needs to check for -EEXIST from
__sysfs_add_one() to decide whether to warn or not.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ