mm/memory.c:3543 do_prot_none() error: double unlock 'spin_lock:ptl'
Quoted 8 lines · Fengguang Wu
Hi Ingo,
FYI, there are new smatch warnings show up in
tree: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git numa/core head: eb4f84b1aaad78ca07e274b81410ec9d60abe434 commit: eb4f84b1aaad78ca07e274b81410ec9d60abe434 [10/10] numa, mm: Fix 4K migration races
Quoted 15 lines
mm/memory.c:805vm_normal_page()info: ignoring unreachable code.
mm/memory.c:805vm_normal_page()info: ignoring unreachable code.
mm/memory.c:984copy_pte_range()warn: inconsistent returns spin_lock:dst_ptl: locked (940) unlocked (979,984)mm/memory.c:984copy_pte_range()warn: inconsistent returns spin_lock:__ptl: locked (979,984) unlocked (940)mm/memory.c:1532follow_page()info: ignoring unreachable code.
mm/memory.c:1651follow_page()warn: inconsistent returns spin_lock:ptl: locked (1628,1650,1651) unlocked (1632,1637)mm/memory.c:1651follow_page()warn: inconsistent returns spin_lock:__ptl: locked (1632,1637) unlocked (1628,1650,1651)mm/memory.c:2688do_wp_page()error: double unlock 'spin_lock:ptl'
mm/memory.c:2733do_wp_page()error: double unlock 'spin_lock:ptl'
mm/memory.c:2761do_wp_page()error: double lock 'spin_lock:__ptl'
mm/memory.c:2823do_wp_page()error: double unlock 'spin_lock:ptl'
mm/memory.c:2853do_wp_page()warn: inconsistent returns spin_lock:__ptl: locked (2838) unlocked (2692,2725,2849,2853)
+mm/memory.c:3543do_prot_none()error: double unlock 'spin_lock:ptl'
+mm/memory.c:3557do_prot_none()error: double lock 'spin_lock:__ptl'
mm/memory.c:3632handle_pte_fault()warn: inconsistent returns spin_lock:ptl: locked (3613) unlocked (3591,3594,3598,3600,3605,3632)
Hm, looks like smatch got confused by the 'locked' variable?
Or can you see real problems in the code?
Thanks,
Ingo
Quoted 27 lines · Ingo Molnar
Quoted 8 lines · Fengguang Wu
Hi Ingo,
FYI, there are new smatch warnings show up in
tree: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git numa/core head: eb4f84b1aaad78ca07e274b81410ec9d60abe434 commit: eb4f84b1aaad78ca07e274b81410ec9d60abe434 [10/10] numa, mm: Fix 4K migration racesQuoted 15 lines
mm/memory.c:805vm_normal_page()info: ignoring unreachable code.
mm/memory.c:805vm_normal_page()info: ignoring unreachable code.
mm/memory.c:984copy_pte_range()warn: inconsistent returns spin_lock:dst_ptl: locked (940) unlocked (979,984)mm/memory.c:984copy_pte_range()warn: inconsistent returns spin_lock:__ptl: locked (979,984) unlocked (940)mm/memory.c:1532follow_page()info: ignoring unreachable code.
mm/memory.c:1651follow_page()warn: inconsistent returns spin_lock:ptl: locked (1628,1650,1651) unlocked (1632,1637)mm/memory.c:1651follow_page()warn: inconsistent returns spin_lock:__ptl: locked (1632,1637) unlocked (1628,1650,1651)mm/memory.c:2688do_wp_page()error: double unlock 'spin_lock:ptl'
mm/memory.c:2733do_wp_page()error: double unlock 'spin_lock:ptl'
mm/memory.c:2761do_wp_page()error: double lock 'spin_lock:__ptl'
mm/memory.c:2823do_wp_page()error: double unlock 'spin_lock:ptl'
mm/memory.c:2853do_wp_page()warn: inconsistent returns spin_lock:__ptl: locked (2838) unlocked (2692,2725,2849,2853)
+mm/memory.c:3543do_prot_none()error: double unlock 'spin_lock:ptl'
+mm/memory.c:3557do_prot_none()error: double lock 'spin_lock:__ptl'
mm/memory.c:3632handle_pte_fault()warn: inconsistent returns spin_lock:ptl: locked (3613) unlocked (3591,3594,3598,3600,3605,3632)
Quoted 3 lines
Hm, looks like smatch got confused by the 'locked' variable?
Or can you see real problems in the code?
Sorry, it's actually an automated notification and I've not yet looked at the code.. I'll fix the build notification script.
Hi Dan, it looks better to only automate the 100% accurate warnings and deliver the others to internal manual check first. Would you recommend some known accurate smatch warnings? It seems to me that the "redundant null check" notes shall be always accurate. For the others, I'm not really sure.
Thanks,
Fengguang