Search Linux Wireless

Re: compat-wireless: backporting kfree_rcu()?

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

 



On Tue, 2011-10-18 at 12:07 +0200, Johannes Berg wrote:
> A complete different idea:
> 
> /* a larger rcu head struct */
> struct compat_rcu_head {
> 	struct rcu_head rh; /* must be first */
> 	void *free_ptr;
> };
> 
> /* define kfree_rcu */
> extern void compat_free_rcu(struct rcu_head *rh);
> 
> #define kfree_rcu(ptr, head)	\
> 	do {
> 		(ptr)->head.free_ptr = ptr;
> 		call_rcu(&(ptr)->head.rh, compat_free_rcu);
> 	} while (0)
> 
> /* use it in all code */
> #define rcu_head compat_rcu_head
> 
> 
> and somewhere in a compat.ko file:
> 
> #undef rcu_head
> void compat_free_rcu(struct rcu_head *rh)
> {
> 	struct compat_rcu_head *crh = (void *)rh;
> 	kfree(crh->free_ptr);
> }
> 
> 
> thoughts?

Doesn't work either -- the new rcu_head will be included in existing
header files like dst.h and they'd get messed up if included after
compat-3.0.h

johannes

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


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux