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:	Fri, 3 Oct 2008 13:41:24 -0700
From:	Greg KH <greg@...ah.com>
To:	Matthew Wilcox <matthew@....cx>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Remove completion from struct klist_node

On Fri, Oct 03, 2008 at 08:06:19AM -0600, Matthew Wilcox wrote:
> On Thu, Oct 02, 2008 at 03:17:45PM -0700, Greg KH wrote:
> > > +struct klist_waiter {
> > > +	struct klist_waiter *next;
> > > +	struct klist_node *node;
> > > +	struct task_struct *process;
> > > +	int woken;
> > > +};
> > 
> > Why not use the built-in list.h functions here?
> 
> I'm somewhat averse to using data structures when they do more than I
> need them to.

But part of the point is that if you use them, no one has to audit your
logic to make sure you got it all correct.

> list_heads are great for when you need to remove an entry
> from the middle of a list, but there are no advantages to using a
> doubly-linked list here -- we always walk it from the start to the end,
> and a singly linked list is fine for this purpose.  Maybe we need a set
> of 'slist' macros so we can use singly-linked-lists without thinking
> terribly hard, but I'd hate to see this patch get stuck behind
> infrastructure improvements.

Is size an issue here?  I don't think so and I'd prefer it to be changed
to use the standard list implementation and not roll your own.  You
never know who will cut-and-paste you code these days :)

Care to respin this?

thanks,

greg k-h
--
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