Re: [PATCH md 003 of 5] Add kobject/sysfs support to raid5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday October 11, akpm@xxxxxxxx wrote:
> NeilBrown <neilb@xxxxxxx> wrote:
> >
> > +static ssize_t
> > +raid5_store_stripe_cache_size(raid5_conf_t *conf, const char *page, ssize_t len)
> > +{
> > +	char *end;
> > +	int new;
> > +	if (len >= PAGE_SIZE)
> > +		return -EINVAL;
> 
> Can `len' be negative?

No, because sysfs_write_file only calls flush_write_buffer
with a 'len' that is >0, and this is the only path that leads to
raid5_store_stripe_cache_size.
Do you think I should be defensive and double-check in
raid5_attr_store?

NeilBrown
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux