[Prism54-devel] Re: CVS Update

Aurelien Alleaume slts at free.fr
Fri Aug 6 11:37:19 UTC 2004


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.

	...And justice for all
	Aurelien

Margit Schubert-While wrote:
> CVS Update -
>         * With module versioning in 2.6, make clean is not
>         * removing everything it should. Fix.
>         *
>         * Change the "version" OID to what it should be.
>         *
>         * Fix memory leaks - mgt_get_request always returns
>         * allocated memory for non-int OIDS (with an exception -
>         * keep reading). If the callee checks the return and itself
>         * returns, then it must free memory.
>         * However, it is possible to return from mgt_get_request
>         * early (!priv->mib). In this case, weird things can happen
>         * in isl_ioctl. Quick fix, at least to force an oops, is
>         * to set the union value to NULL. The real fix is to
>         * recode all mgt_get_request calls in isl_ioctl.
>         *
>         * Trivial change to prismcompat24.h to cater for casted
>         * parameter to netdev_priv.
> 
> Margit
> 
> 
> 



More information about the Prism54-devel mailing list