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.
This commit is contained in:
parent
f531e07502
commit
61ef738d5e
@ -920,7 +920,7 @@ mmcsd_ioctl_cmd(struct mmcsd_part *part, struct mmc_ioc_cmd *mic, int fflag)
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user