lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 11 Nov 2022 16:45:06 +0100 From: Bean Huo <huobean@...il.com> To: Arthur Simchaev <Arthur.Simchaev@....com>, martin.petersen@...cle.com Cc: beanhuo@...ron.com, linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH v2 2/4] ufs: core: Remove redundant desc_size variable from hba On 02.11.22 3:29 PM, Arthur Simchaev wrote: > @@ -7446,25 +7428,24 @@ static u32 ufshcd_find_max_sup_active_icc_level(struct ufs_hba *hba, > static void ufshcd_set_active_icc_lvl(struct ufs_hba *hba) > { > int ret; > - int buff_len = hba->desc_size[QUERY_DESC_IDN_POWER]; > u8 *desc_buf; > u32 icc_level; > > - desc_buf = kmalloc(buff_len, GFP_KERNEL); > + desc_buf = kmalloc(QUERY_DESC_MAX_SIZE, GFP_KERNEL); > if (!desc_buf) Hi Arthur, Do you think it is better to use kzalloc or kmalloc here? If item in the descriptor is not supported by the device, it will be 0x00 and then the relevant feature will be marked as disabled or not supported on the device feature checkup logic. Kind regards, Bean
Powered by blists - more mailing lists