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:	Thu, 28 Dec 2006 18:31:01 +0000
From:	Christoph Hellwig <hch@...radead.org>
To:	Corey Minyard <minyard@....org>
Cc:	Andrew Morton <akpm@...l.org>,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Carol Hebert <cah@...ibm.com>,
	OpenIPMI Developers <openipmi-developer@...ts.sourceforge.net>
Subject: Re: [PATCH] IPMI: fix some RCU problems

> +	if (list_empty(&intf->cmd_rcvrs))
> +		INIT_LIST_HEAD(&list);
> +	else {
> +		list.next = intf->cmd_rcvrs.next;
> +		list.prev = intf->cmd_rcvrs.prev;
> +		INIT_LIST_HEAD(&intf->cmd_rcvrs);
> +
> +		/*
> +		 * At this point the list body still points to
> +		 * intf->cmd_rcvrs.  Wait for any readers to finish
> +		 * using the list before we switch the list body over
> +		 * to the new list.
> +		 */
> +		synchronize_rcu();
> +
> +		/* Ready the list for use. */
> +		list.next->prev = &list;
> +		list.prev->next = &list;
> +	}

This kind of thing must not be opencoded in drivers.  Please add
a new list_splice_rcu helper to list.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