Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Jun 2019 01:16:04 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r348713 - in stable/12/sys/dev: mpr mps
Message-ID:  <201906060116.x561G49b099185@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Thu Jun  6 01:16:04 2019
New Revision: 348713
URL: https://svnweb.freebsd.org/changeset/base/348713

Log:
  MFC r348417: Fix busy status leak in case of incorrect passthrough args.

Modified:
  stable/12/sys/dev/mpr/mpr_user.c
  stable/12/sys/dev/mps/mps_user.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/mpr/mpr_user.c
==============================================================================
--- stable/12/sys/dev/mpr/mpr_user.c	Wed Jun  5 23:37:50 2019	(r348712)
+++ stable/12/sys/dev/mpr/mpr_user.c	Thu Jun  6 01:16:04 2019	(r348713)
@@ -790,8 +790,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: stable/12/sys/dev/mps/mps_user.c
==============================================================================
--- stable/12/sys/dev/mps/mps_user.c	Wed Jun  5 23:37:50 2019	(r348712)
+++ stable/12/sys/dev/mps/mps_user.c	Thu Jun  6 01:16:04 2019	(r348713)
@@ -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?201906060116.x561G49b099185>