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; } _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"