Re: [PATCH 3/3] zswap: change zpool/compressor at runtime

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

 



On Wed,  5 Aug 2015 09:46:43 -0400 Dan Streetman <ddstreet@xxxxxxxx> wrote:

> Update the zpool and compressor parameters to be changeable at runtime.
> When changed, a new pool is created with the requested zpool/compressor,
> and added as the current pool at the front of the pool list.  Previous
> pools remain in the list only to remove existing compressed pages from.
> The old pool(s) are removed once they become empty.
> 
> +/*********************************
> +* param callbacks
> +**********************************/
> +
> +static int __zswap_param_set(const char *val, const struct kernel_param *kp,
> +			     char *type, char *compressor)
> +{
> +	struct zswap_pool *pool, *put_pool = NULL;
> +	char str[kp->str->maxlen], *s;

What's the upper bound on the size of this variable-sized array?

> +	int ret;
> +
> +	strlcpy(str, val, kp->str->maxlen);
> +	s = strim(str);
> +
> +	/* if this is load-time (pre-init) param setting,

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]