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

Commit e700f3f6 authored by Sayali Lokhande's avatar Sayali Lokhande Committed by Gerrit - the friendly Code Review server
Browse files

scsi: ufs: Avoid writing null to Boot LUN enable attribute



In ufshcd_query_ioctl(), if attribute value passed in
user buffer is null, boot feature will be disabled and
device enters in EDL mode.
To fix this, add check in ioctl path to avoid writing 00h
to Boot LUN enable attribute.

Change-Id: Ib7983075de3d6968a215cbc8b79c42a20fcc71a4
Signed-off-by: default avatarSayali Lokhande <sayalil@codeaurora.org>
parent b29f3404
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -9207,7 +9207,7 @@ static int ufshcd_query_ioctl(struct ufs_hba *hba, u8 lun, void __user *buffer)
		switch (ioctl_data->idn) {
		case QUERY_ATTR_IDN_BOOT_LU_EN:
			index = 0;
			if (att > QUERY_ATTR_IDN_BOOT_LU_EN_MAX) {
			if (!att || att > QUERY_ATTR_IDN_BOOT_LU_EN_MAX) {
				dev_err(hba->dev,
					"%s: Illegal ufs query ioctl data, opcode 0x%x, idn 0x%x, att 0x%x\n",
					__func__, ioctl_data->opcode,