Re: [PATCH] isdn: mISDN: tei: Fix a sleep-in-atomic-context bug in create_teimgr()

From: Jia-Ju Bai
Date: Sun Sep 02 2018 - 21:40:29 EST




On 2018/9/3 0:31, isdn@xxxxxxxxxxxxxx wrote:
Hi,

I do not understand the analysis and do not see that the spinlock is a
problem here.
I think your DSAC analyzer assumes that the FUNC_PTR mgr_ctrl call calls
the mgr_ctrl in tei.c, but in real it calls l2->ch.ctrl() which is the
function in layer2.c, not tei.c. And the function in layer2.c should not
do any GFP_KERNEL allocation.

Same for your 2. reported issue.

Okay, thanks for your reply.
My analysis handles the function pointer using the function type and structure field, but it cannot distinguish the different variables of the same type and field now.
I will try to improve my tool, thanks for your explanation.


Best wishes,
Jia-Ju Bai