From 0357f85f31060e3c260630fefa0c28e5ed3c3deb Mon Sep 17 00:00:00 2001 From: jmatthew Date: Sun, 26 Jun 2022 15:33:37 +0000 Subject: [PATCH] Break out of the switch statement rather than returning early on ioctl errors, ensuring the IPL is correctly restored. from Christian Ludwig --- sys/dev/pci/if_mcx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/pci/if_mcx.c b/sys/dev/pci/if_mcx.c index 99930d7a2fe..f0369068229 100644 --- a/sys/dev/pci/if_mcx.c +++ b/sys/dev/pci/if_mcx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mcx.c,v 1.104 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: if_mcx.c,v 1.105 2022/06/26 15:33:37 jmatthew Exp $ */ /* * Copyright (c) 2017 David Gwynne @@ -7515,7 +7515,7 @@ mcx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) if (ether_addmulti(ifr, &sc->sc_ac) == ENETRESET) { error = ether_multiaddr(&ifr->ifr_addr, addrlo, addrhi); if (error != 0) - return (error); + break; dest = MCX_FLOW_CONTEXT_DEST_TYPE_TABLE | sc->sc_rss_flow_table_id; @@ -7553,7 +7553,7 @@ mcx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) if (ether_delmulti(ifr, &sc->sc_ac) == ENETRESET) { error = ether_multiaddr(&ifr->ifr_addr, addrlo, addrhi); if (error != 0) - return (error); + break; for (i = 0; i < MCX_NUM_MCAST_FLOWS; i++) { if (memcmp(sc->sc_mcast_flows[i], addrlo, -- 2.20.1