Search Linux Wireless

Re: compat-wireless: backporting kfree_rcu()?

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

 



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?

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