Module Name: src Committed By: jmcneill Date: Sat Apr 22 14:19:36 UTC 2017
Modified Files: src/sys/dev/sdmmc: ld_sdmmc.c Log Message: Ensure that the task is returned to the free task list in an error branch. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/dev/sdmmc/ld_sdmmc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/sdmmc/ld_sdmmc.c diff -u src/sys/dev/sdmmc/ld_sdmmc.c:1.25 src/sys/dev/sdmmc/ld_sdmmc.c:1.26 --- src/sys/dev/sdmmc/ld_sdmmc.c:1.25 Sat Jan 7 16:24:40 2017 +++ src/sys/dev/sdmmc/ld_sdmmc.c Sat Apr 22 14:19:36 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ld_sdmmc.c,v 1.25 2017/01/07 16:24:40 martin Exp $ */ +/* $NetBSD: ld_sdmmc.c,v 1.26 2017/04/22 14:19:36 jmcneill Exp $ */ /* * Copyright (c) 2008 KIYOHARA Takashi @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v 1.25 2017/01/07 16:24:40 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v 1.26 2017/04/22 14:19:36 jmcneill Exp $"); #ifdef _KERNEL_OPT #include "opt_sdmmc.h" @@ -248,8 +248,8 @@ ld_sdmmc_dobio(void *arg) bp->b_rawblkno, sc->sc_sf->csd.capacity); bp->b_error = EINVAL; bp->b_resid = bp->b_bcount; - lddone(&sc->sc_ld, bp); - return; + + goto done; } if (bp->b_flags & B_READ) @@ -277,6 +277,7 @@ ld_sdmmc_dobio(void *arg) bp->b_resid = 0; } +done: TAILQ_INSERT_TAIL(&sc->sc_freeq, &task->task, next); lddone(&sc->sc_ld, bp);