FreeBSD Bugzilla – Attachment 183570 Details for
Bug 220078
[patch] [panic] repeatable kernel panic due to unlocked INADDR_TO_IFP usage
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
lock access to INADDR_HASH in the ip_input()
ip_input.c.diff (text/plain), 914 bytes, created by
Eugene Grosbein
on 2017-06-17 12:22:14 UTC
(
hide
)
Description:
lock access to INADDR_HASH in the ip_input()
Filename:
MIME Type:
Creator:
Eugene Grosbein
Created:
2017-06-17 12:22:14 UTC
Size:
914 bytes
patch
obsolete
>--- sys/netinet/ip_input.c.orig 2017-06-17 17:48:27.329463000 +0700 >+++ sys/netinet/ip_input.c 2017-06-17 18:17:47.363190000 +0700 >@@ -446,6 +446,7 @@ > void > ip_input(struct mbuf *m) > { >+ struct rm_priotracker in_ifa_tracker; > struct ip *ip = NULL; > struct in_ifaddr *ia = NULL; > struct ifaddr *ifa; >@@ -677,7 +678,7 @@ > /* > * Check for exact addresses in the hash bucket. > */ >- /* IN_IFADDR_RLOCK(); */ >+ IN_IFADDR_RLOCK(&in_ifa_tracker); > LIST_FOREACH(ia, INADDR_HASH(ip->ip_dst.s_addr), ia_hash) { > /* > * If the address matches, verify that the packet >@@ -689,11 +690,11 @@ > counter_u64_add(ia->ia_ifa.ifa_ipackets, 1); > counter_u64_add(ia->ia_ifa.ifa_ibytes, > m->m_pkthdr.len); >- /* IN_IFADDR_RUNLOCK(); */ >+ IN_IFADDR_RUNLOCK(&in_ifa_tracker); > goto ours; > } > } >- /* IN_IFADDR_RUNLOCK(); */ >+ IN_IFADDR_RUNLOCK(&in_ifa_tracker); > > /* > * Check for broadcast addresses.
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 220078
:
183567
|
183568
|
183569
| 183570 |
183590
|
187688
|
187689