[PATCH 2/2] ath79: mikrotik: Change the moment of routerboot partition parser init

Denis K denis281089 at gmail.com
Tue Nov 16 08:17:29 PST 2021


Thank you for your help, Thibaut. I think we've found the right way of
initializing routerboot. I've sent a v2 of the patch.

Denis

вт, 16 нояб. 2021 г. в 13:20, Thibaut <hacks at slashdirt.org>:
>
> Hi,
>
> > Le 16 nov. 2021 à 10:46, Denis K <denis281089 at gmail.com> a écrit :
> >
> > I got it! _exit macro of rb_hardconfig_init seems to cause this kernel
> > panic. Here is a patch.
>
> Thanks; indeed that’s logical: functions marked as __exit are discarded when the module is built into the kernel: they’re no longer available when the mtd_notifier executes the remove() callback. I missed that. Since these are very small, I agree it’s ok to remove the __exit qualifier.
>
> I see the same rationale for removing the __init qualifier from the init functions since the mtd notifier could be called at any point during kernel execution, but that bothers me a bit more because these are somewhat large functions. Then again it’s a tradeoff between doing the right thing (using a notifier) vs using a workaround (late_initcall()). I think it’s acceptable.
>
> Anyway, I’ve refactored the patch with your changes and I added a note and edited the commit message about the point above; see attachment below. Hopefully this one is good to go :)
>
> You are the author of this patch and you did all the heavy lifting (thanks again for that), so if you have no further changes/comments I’d suggest you submit this as a v2. I’ll ACK it then (please CC-me - this should be automatic with my SoB-line added).
>
> Thanks,
> Thibaut
>



More information about the openwrt-devel mailing list