Re: idea on how to break the static dependencies on demodulator modules

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

 



On Tue, 16 May 2006, Johannes Stezenbach wrote:
> dvb_unregister_frontend():
> ...
>
> + 	while(fe->ops->release) {
> + 		struct module *m = fe->ops->release(fe);
> + 		if (m)
> + 			module_put(m);
> + 	}
> +
>
> - this way of chaining release() looks just sick
>   (is it even legal C code? can the optimizer not optimize
>   away the fe->ops->release register reload and turn this
>   into an endless loop?)
> - the module_put() in there is just as wrong as doing
>   the module_put() inside release()

Besides that, it has a bug.  It will access memory that has been
kfree()'d.  See my message here:
http://www.linuxtv.org/pipermail/linux-dvb/2006-May/010159.html

In that message I posted an example of something that will work, with
just the core change, plus two example demod changes.

_______________________________________________

linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux