Search Linux Wireless

Re: [PATCH 16/18] mac80211 hwsim: verify vif pointers

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

 



On Wed, 2008-09-10 at 17:06 -0700, Luis R. Rodriguez wrote:
> On Wed, Sep 10, 2008 at 03:02:01PM -0700, Johannes Berg wrote:
> > --- everything.orig/drivers/net/wireless/mac80211_hwsim.c       2008-09-10 23:58:05.000000000 +0200
> > +++ everything/drivers/net/wireless/mac80211_hwsim.c    2008-09-10 23:58:11.000000000 +0200
> > @@ -28,6 +28,29 @@ static int radios = 2;
> >  module_param(radios, int, 0444);
> >  MODULE_PARM_DESC(radios, "Number of simulated radios");
> > 
> > +struct hwsim_vif_priv {
> > +       u32 magic;
> > +};
> > +
> > +#define HWSIM_VIF_MAGIC        0x69537748
> > +
> > +static inline void hwsim_check_magic(struct ieee80211_vif *vif)
> > +{
> > +       struct hwsim_vif_priv *vp = (void *)vif->drv_priv;
> > +       BUG_ON(vp->magic != HWSIM_VIF_MAGIC);
> 
> If its a debugging tool then better WARN_ON instead no?

I don't know, yeah, maybe. I can change it.

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[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