Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] Re: [patch] av7110_attach()
Manfred Petz wrote:
>
> Well, I don't know, if that solves my problem (still testing), but there is
> a bug in av7110_attach(): the struct av7110 gets kfree()'d in case of
> some initializiation errors, but arm_thread() is still running.
>
> It occurs, if av7110_init_v4l() fails (I dunno why, but this seems to
> be the case here sometimes). Another issue: the struct av7110 gets kfree()'d
> in this case, but members of it are accessed a few lines below.
...
> @@ -1505,9 +1506,6 @@
> return 0;
>
> err:
> - if (NULL != av7110 ) {
> - kfree(av7110);
> - }
> if (NULL != av7110->debi_virt) {
> pci_free_consistent(dev->pci, 8192, av7110->debi_virt, av7110->debi_bus);
> }
> @@ -1520,6 +1518,13 @@
>
> dvb_unregister_adapter (av7110->dvb_adapter);
>
> + if (NULL != av7110 ) {
> + av7110->arm_thread_keep=0;
> + while (av7110->arm_thread)
> + usleep (1);
> + kfree(av7110);
> + }
> +
Urgh! The kfree(av7110) was indeed grossly misplaced.
> + int arm_thread_keep;
The arm_rmmod flag is suffient, but otherwise the patch looks fine.
Thanks,
Johannes
--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.
Home |
Main Index |
Thread Index