[Prism54-devel] Re: CVS Update
Aurelien Alleaume
slts at free.fr
Fri Aug 6 13:11:37 UTC 2004
After reading related code, I think the current code is OK. We could
change "if(!priv->mib) return;" to "BUG_ON(!priv->mib);".
But if we want the driver safe, we need to ensure nobody accesses the
priv struct after netdev is unregistered:
* I think that unregistering netdevice syncs and disable ioctl (not sure
but it 'should' be true).
* We must be sure that no wireless-stats update remains scheduled. (use
"flush_scheduled_work();")
Then it is safe to call "mgt_clean();"
The only thing missing is thus a "flush_scheduled_work();" in
prism54_remove, right after "unregister_netdev()".
...And justice for all
Aurelien
Margit Schubert-While wrote:
> At 13:37 06.08.2004 +0200, Aurelien scribeth:
>
>> Hi Margit,
>> the (!priv->mib) check in mgt_get_request should be a debugging test.
>> It should never happen. At least if the rest is well coded (which
>> isn't the case right now)... To solve the races with alloc/free of
>> mib memory, we should probably use the mib_sem. ie : take a read lock
>> before accessing this memory and a write lock before allocating/freeing.
>> There sould not be any need to recode all mgt_get_request calls in
>> isl_ioctl. Changing the locking in some function of oid_mgt.c should
>> be enough.
>> I'm gonna take a deeper look at this right now to see if all this is
>> possible.
>
>
> Yes, I agree.
> Go for it !
> I just want to get the kernel driver in good shape.
>
> Thanks
>
> Cheers
>
> Margit
>
>
> _______________________________________________
> Prism54-devel mailing list
> Prism54-devel at prism54.org
> http://prism54.org/mailman/listinfo/prism54-devel
>
>
More information about the Prism54-devel
mailing list