Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 May 2021 10:00:35 GMT
From:      Tai-hwa Liang <avatar@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 33f31648b93e - stable/11 - if_firewire: fixing panic upon packet reception for VNET build
Message-ID:  <202105171000.14HA0ZKN053244@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/11 has been updated by avatar:

URL: https://cgit.FreeBSD.org/src/commit/?id=33f31648b93e37aa746c5cde68c61b66564f1759

commit 33f31648b93e37aa746c5cde68c61b66564f1759
Author:     Tai-hwa Liang <avatar@FreeBSD.org>
AuthorDate: 2021-04-10 15:32:27 +0000
Commit:     Tai-hwa Liang <avatar@FreeBSD.org>
CommitDate: 2021-05-17 09:23:00 +0000

    if_firewire: fixing panic upon packet reception for VNET build
    
    netisr_dispatch_src() needs valid VNET pointer or firewire_input() will panic
    when receiving a packet.
    
    Reviewed by:    glebius
    MFC after:      2 weeks
    
    (cherry picked from commit d9b61e7153c64b141436b4d9619b166c6d35a0a6)
---
 sys/net/if_fwsubr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/net/if_fwsubr.c b/sys/net/if_fwsubr.c
index f0f6de598f8d..d091d6518060 100644
--- a/sys/net/if_fwsubr.c
+++ b/sys/net/if_fwsubr.c
@@ -632,7 +632,9 @@ firewire_input(struct ifnet *ifp, struct mbuf *m, uint16_t src)
 	}
 
 	M_SETFIB(m, ifp->if_fib);
+	CURVNET_SET_QUIET(ifp->if_vnet);
 	netisr_dispatch(isr, m);
+	CURVNET_RESTORE();
 }
 
 int



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105171000.14HA0ZKN053244>