svn commit: r327926 - head/sys/dev/mmc
Marius Strobl
marius at FreeBSD.org
Sat Jan 13 16:32:11 UTC 2018
Author: marius
Date: Sat Jan 13 16:32:09 2018
New Revision: 327926
URL: https://svnweb.freebsd.org/changeset/base/327926
Log:
Fix a bug introduced in r327355; in mmcsd_ioctl_cmd() when ensuring
that userland doesn't switch partitions on its own, compare against
the partition mmcsd_ioctl_cmd() is going to switch to (based on the
device node used) rather than the currently selected partition.
Modified:
head/sys/dev/mmc/mmcsd.c
Modified: head/sys/dev/mmc/mmcsd.c
==============================================================================
--- head/sys/dev/mmc/mmcsd.c Sat Jan 13 16:31:07 2018 (r327925)
+++ head/sys/dev/mmc/mmcsd.c Sat Jan 13 16:32:09 2018 (r327926)
@@ -920,7 +920,7 @@ mmcsd_ioctl_cmd(struct mmcsd_part *part, struct mmc_io
*/
if (cmd.opcode == MMC_SWITCH_FUNC && dp != NULL &&
(((uint8_t *)dp)[EXT_CSD_PART_CONFIG] &
- EXT_CSD_PART_CONFIG_ACC_MASK) != sc->part_curr) {
+ EXT_CSD_PART_CONFIG_ACC_MASK) != part->type) {
err = EINVAL;
goto out;
}
More information about the svn-src-all
mailing list