Date: Thu, 30 May 2019 14:13:09 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348417 - in head/sys/dev: mpr mps Message-ID: <201905301413.x4UED9D5093084@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Thu May 30 14:13:09 2019 New Revision: 348417 URL: https://svnweb.freebsd.org/changeset/base/348417 Log: Fix busy status leak in case of incorrect passthrough args. MFC after: 1 week Modified: head/sys/dev/mpr/mpr_user.c head/sys/dev/mps/mps_user.c Modified: head/sys/dev/mpr/mpr_user.c ============================================================================== --- head/sys/dev/mpr/mpr_user.c Thu May 30 13:52:32 2019 (r348416) +++ head/sys/dev/mpr/mpr_user.c Thu May 30 14:13:09 2019 (r348417) @@ -791,8 +791,10 @@ mpr_user_pass_thru(struct mpr_softc *sc, mpr_pass_thru data->DataDirection = MPR_PASS_THRU_DIRECTION_READ; else data->DataOutSize = 0; - } else - return (EINVAL); + } else { + err = EINVAL; + goto RetFreeUnlocked; + } mpr_dprint(sc, MPR_USER, "%s: req 0x%jx %d rpl 0x%jx %d " "data in 0x%jx %d data out 0x%jx %d data dir %d\n", __func__, Modified: head/sys/dev/mps/mps_user.c ============================================================================== --- head/sys/dev/mps/mps_user.c Thu May 30 13:52:32 2019 (r348416) +++ head/sys/dev/mps/mps_user.c Thu May 30 14:13:09 2019 (r348417) @@ -802,8 +802,10 @@ mps_user_pass_thru(struct mps_softc *sc, mps_pass_thru data->DataDirection = MPS_PASS_THRU_DIRECTION_READ; else data->DataOutSize = 0; - } else - return (EINVAL); + } else { + err = EINVAL; + goto RetFreeUnlocked; + } mps_dprint(sc, MPS_USER, "%s: req 0x%jx %d rpl 0x%jx %d " "data in 0x%jx %d data out 0x%jx %d data dir %d\n", __func__,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905301413.x4UED9D5093084>