From 1f8da7687b8a3fd6cad378dd58b75f0ded57a43c Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Fri, 22 Feb 2013 11:09:20 +0100 Subject: [PATCH 012/257] Let g_eli_write_done() verify that sc isn't NULL as well It looks similar enough to g_eli_read_done() to be affected by kern/162036 as well. Obtained from: ElectroBSD --- sys/geom/eli/g_eli.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/geom/eli/g_eli.c b/sys/geom/eli/g_eli.c index bd198c043c2c..920ed0cc118e 100644 --- a/sys/geom/eli/g_eli.c +++ b/sys/geom/eli/g_eli.c @@ -260,7 +260,8 @@ g_eli_write_done(struct bio *bp) */ sc = pbp->bio_to->geom->softc; g_io_deliver(pbp, pbp->bio_error); - atomic_subtract_int(&sc->sc_inflight, 1); + if (sc != NULL) + atomic_subtract_int(&sc->sc_inflight, 1); } /* -- 2.11.0