[Bug 230498] Fatal trap 12: page fault while in kernel mode in sysctl_dumpentry from sysctl NET_RT_DUMP

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Nov 20 09:46:39 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230498

Andrey V. Elsukov <ae at FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #199345|0                           |1
        is obsolete|                            |

--- Comment #8 from Andrey V. Elsukov <ae at FreeBSD.org> ---
Created attachment 199372
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=199372&action=edit
Proposed patch (for stable/12+)

Sorry, but I think the panic is still possible. The kernel sets IFF_DYING flag
too late, instead we can check for presence of IFF_UP. Also, do not reset to
NULL ifp->if_addr pointer in the if_detach_internal(), this doesn't look like
very useful and also will protect us from NULL pointer dereference, when
another thread will detach interface after we check IFF_UP flag. The accessing
to if_addr is safe in this case due to using epoch_call() in ifa_free().

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-net mailing list