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:	Tue, 25 Jul 2006 14:24:56 +1000
From:	Greg Banks <gnb@...bourne.sgi.com>
To:	Neil Brown <neilb@...e.de>
Cc:	Josef Sipek <jsipek@....cs.sunysb.edu>,
	Andrew Morton <akpm@...l.org>,
	Linux NFS Mailing List <nfs@...ts.sourceforge.net>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [NFS] [PATCH 002 of 9] knfsd: knfsd: Remove an unused variable
	from e_show().

On Tue, 2006-07-25 at 14:20, Neil Brown wrote:
> On Tuesday July 25, jsipek@....cs.sunysb.edu wrote:
> > On Tue, Jul 25, 2006 at 11:54:32AM +1000, NeilBrown wrote:
> > ...
> > > diff .prev/fs/nfsd/export.c ./fs/nfsd/export.c
> > > --- .prev/fs/nfsd/export.c	2006-07-24 14:33:06.000000000 +1000
> > > +++ ./fs/nfsd/export.c	2006-07-24 14:33:26.000000000 +1000
> > > @@ -1178,7 +1178,6 @@ static int e_show(struct seq_file *m, vo
> > ...
> > >  	if (p == (void *)1) {
> > 
> > I'm not an NFS expert, but the above makes me want to puke. Isn't there a
> > cleaner way of doing whatever needs to be done without:
> > 
> > 1) hard-coding a constant
> > 2) comparing a variable to an arbitrary pointer
> > 
> 
> Probably.  We just need a pointer value that is definitely not a
> pointer to a valid cache_head object, and is not NULL.
> (void*)1 seems a reasonable choice, but maybe #defineing something
> would help.

include/linux/seq_file.h:

#define SEQ_START_TOKEN ((void *)1)

Greg.
-- 
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
I don't speak for SGI.


-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ