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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 29 Jul 2015 09:14:58 +0200
From:	Jean Delvare <jdelvare@...e.de>
To:	Vladimir Zapolskiy <vz@...ia.com>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/8] misc: eeprom: clean up eeprom_read()

On Mon, 27 Jul 2015 00:18:49 +0300, Vladimir Zapolskiy wrote:
> The change removes redundant sysfs binary file boundary check, since
> this task is already done on caller side in fs/sysfs/file.c
> 
> Signed-off-by: Vladimir Zapolskiy <vz@...ia.com>
> Cc: Jean Delvare <jdelvare@...e.com>
> ---
>  drivers/misc/eeprom/eeprom.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/misc/eeprom/eeprom.c b/drivers/misc/eeprom/eeprom.c
> index b432873..7342fd6 100644
> --- a/drivers/misc/eeprom/eeprom.c
> +++ b/drivers/misc/eeprom/eeprom.c
> @@ -88,11 +88,6 @@ static ssize_t eeprom_read(struct file *filp, struct kobject *kobj,
>  	struct eeprom_data *data = i2c_get_clientdata(client);
>  	u8 slice;
>  
> -	if (off > EEPROM_SIZE)
> -		return 0;
> -	if (off + count > EEPROM_SIZE)
> -		count = EEPROM_SIZE - off;
> -
>  	/* Only refresh slices which contain requested bytes */
>  	for (slice = off >> 5; slice <= (off + count - 1) >> 5; slice++)
>  		eeprom_update_client(client, slice);

Thanks for the clean-up.

Reviewed-by: Jean Delvare <jdelvare@...e.de>

-- 
Jean Delvare
SUSE L3 Support
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ