Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys/net Pull up following revision(s) (requested by ozaki...
details: https://anonhg.NetBSD.org/src/rev/187adc95c521
branches: netbsd-8
changeset: 434477:187adc95c521
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Fri Dec 08 06:12:35 2017 +0000
description:
Pull up following revision(s) (requested by ozaki-r in ticket #431):
sys/net/if_pppoe.c: revision 1.133
Remove wrong assertions
rw_lock_held() returns true when any context holds the lock. However, in
if_pppoe.c, the function was used wrongly as it returns true only if the lock is
held in the same context.
>From s-yamaguchi@IIJ
diffstat:
sys/net/if_pppoe.c | 18 ++----------------
1 files changed, 2 insertions(+), 16 deletions(-)
diffs (82 lines):
diff -r 0a2755296cd4 -r 187adc95c521 sys/net/if_pppoe.c
--- a/sys/net/if_pppoe.c Fri Dec 08 06:10:46 2017 +0000
+++ b/sys/net/if_pppoe.c Fri Dec 08 06:12:35 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_pppoe.c,v 1.125.6.2 2017/11/02 20:28:24 snj Exp $ */
+/* $NetBSD: if_pppoe.c,v 1.125.6.3 2017/12/08 06:12:35 msaitoh Exp $ */
/*-
* Copyright (c) 2002, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.125.6.2 2017/11/02 20:28:24 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.125.6.3 2017/12/08 06:12:35 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "pppoe.h"
@@ -135,9 +135,7 @@
#define PPPOE_LOCK(_sc, _op) rw_enter(&(_sc)->sc_lock, (_op))
#define PPPOE_UNLOCK(_sc) rw_exit(&(_sc)->sc_lock)
-#define PPPOE_LOCKED(_sc) rw_lock_held(&(_sc)->sc_lock)
#define PPPOE_WLOCKED(_sc) rw_write_held(&(_sc)->sc_lock)
-#define PPPOE_RLOCKED(_sc) rw_read_held(&(_sc)->sc_lock)
#ifdef PPPOE_MPSAFE
#define DECLARE_SPLNET_VARIABLE
@@ -1049,8 +1047,6 @@
struct ether_header *eh;
uint16_t etype;
- KASSERT(PPPOE_LOCKED(sc));
-
if (sc->sc_eth_if == NULL) {
m_freem(m);
return EIO;
@@ -1253,8 +1249,6 @@
int len, l1 = 0, l2 = 0; /* XXX: gcc */
uint8_t *p;
- KASSERT(PPPOE_LOCKED(sc));
-
if (sc->sc_state >PPPOE_STATE_PADI_SENT)
panic("pppoe_send_padi in state %d", sc->sc_state);
@@ -1529,8 +1523,6 @@
uint8_t *p;
size_t len, l1 = 0; /* XXX: gcc */
- KASSERT(PPPOE_LOCKED(sc));
-
if (sc->sc_state != PPPOE_STATE_PADR_SENT)
return EIO;
@@ -1624,8 +1616,6 @@
uint8_t *p;
size_t len;
- KASSERT(PPPOE_LOCKED(sc)); /* required by pppoe_output(). */
-
if (sc->sc_state != PPPOE_STATE_PADO_SENT)
return EIO;
@@ -1699,8 +1689,6 @@
struct pppoe_softc *sc = (void *)sp;
int wtime;
- KASSERT(!PPPOE_LOCKED(sc));
-
PPPOE_LOCK(sc, RW_READER);
if (sc->sc_state != PPPOE_STATE_INITIAL) {
@@ -1730,8 +1718,6 @@
{
struct pppoe_softc *sc = (void *)sp;
- KASSERT(!PPPOE_LOCKED(sc));
-
PPPOE_LOCK(sc, RW_WRITER);
if (sc->sc_state < PPPOE_STATE_SESSION) {
Home |
Main Index |
Thread Index |
Old Index