Re: [PATCH v3 04/38] lib: Add a simple prime number generator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 16, 2016 at 07:25:16PM +0000, Chris Wilson wrote:
> +static void __exit primes_exit(void)
> +{
> +	const struct primes *p;
> +
> +	mutex_lock(&lock);
> +	p = rcu_dereference_protected(primes, lockdep_is_held(&lock));
> +	if (p != &small_primes) {
> +		kfree_rcu((struct primes *)p, rcu);
> +		rcu_assign_pointer(p, &small_primes);

Too much sparse appleasing, too little thinking. It's only the module
shutdown path, but we might as well be correct: s/p/primes here.
-Chris
> 

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux