Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1dddc2e8 authored by Siba Prasad's avatar Siba Prasad
Browse files

Revert "mmc: card: block: check the user controlled parameters to avoid overflow"



Commit 4fc34e42 ("mmc: card: block: check the user controlled
parameters to avoid overflow") needs to be reverted since it causes
memory leak in an API, while exiting without freeing the allocated memory. 

Change-Id: I1b5cf6827b1c6663da308cc5eaa4b637226453e0
Signed-off-by: default avatarSiba Prasad <sibap@codeaurora.org>
parent c128d06e
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -636,14 +636,6 @@ static int mmc_blk_ioctl_cmd(struct block_device *bdev,
	cmd.arg = idata->ic.arg;
	cmd.flags = idata->ic.flags;

	if (idata->ic.postsleep_max_us < idata->ic.postsleep_min_us) {
		pr_err("%s: min value: %u must not be greater than max value: %u\n",
			__func__, idata->ic.postsleep_min_us,
			idata->ic.postsleep_max_us);
		WARN_ON(1);
		return -EPERM;
	}

	if (idata->buf_bytes) {
		data.sg = &sg;
		data.sg_len = 1;