FreeBSD Bugzilla – Attachment 199450 Details for
Bug 230498
Fatal trap 12: page fault while in kernel mode in sysctl_dumpentry from sysctl NET_RT_DUMP
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
rtsock.diff (text/plain), 1.31 KB, created by
Andrey V. Elsukov
on 2018-11-22 14:22:20 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Andrey V. Elsukov
Created:
2018-11-22 14:22:20 UTC
Size:
1.31 KB
patch
obsolete
>Index: sys/net/if.c >=================================================================== >--- sys/net/if.c (revision 340543) >+++ sys/net/if.c (working copy) >@@ -1032,6 +1032,8 @@ if_detach_internal(struct ifnet *ifp, int vmove, s > if (iter == ifp) { > TAILQ_REMOVE(&V_ifnet, ifp, if_link); > found = 1; >+ if (!vmove) >+ ifp->if_flags |= IFF_DYING; > break; > } > IFNET_WUNLOCK(); >Index: sys/net/rtsock.c >=================================================================== >--- sys/net/rtsock.c (revision 340543) >+++ sys/net/rtsock.c (working copy) >@@ -1555,7 +1555,7 @@ sysctl_dumpentry(struct radix_node *rn, void *vw) > info.rti_info[RTAX_NETMASK] = rtsock_fix_netmask(rt_key(rt), > rt_mask(rt), &ss); > info.rti_info[RTAX_GENMASK] = 0; >- if (rt->rt_ifp) { >+ if (rt->rt_ifp && !(rt->rt_ifp->if_flags & IFF_DYING)) { > info.rti_info[RTAX_IFP] = rt->rt_ifp->if_addr->ifa_addr; > info.rti_info[RTAX_IFA] = rt->rt_ifa->ifa_addr; > if (rt->rt_ifp->if_flags & IFF_POINTOPOINT) >@@ -1913,8 +1913,10 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS) > rnh = rt_tables_get_rnh(fib, i); > if (rnh != NULL) { > RIB_RLOCK(rnh); >+ IFNET_RLOCK_NOSLEEP(); > error = rnh->rnh_walktree(&rnh->head, > sysctl_dumpentry, &w); >+ IFNET_RUNLOCK_NOSLEEP(); > RIB_RUNLOCK(rnh); > } else if (af != 0) > error = EAFNOSUPPORT;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 230498
:
199064
|
199344
|
199345
|
199372
|
199444
|
199449
| 199450