|
@@ -585,8 +585,7 @@ static ssize_t update_mpp(u64 *entitlement, u8 *weight)
|
|
|
static ssize_t lparcfg_write(struct file *file, const char __user * buf,
|
|
|
size_t count, loff_t * off)
|
|
|
{
|
|
|
- int kbuf_sz = 64;
|
|
|
- char kbuf[kbuf_sz];
|
|
|
+ char kbuf[64];
|
|
|
char *tmp;
|
|
|
u64 new_entitled, *new_entitled_ptr = &new_entitled;
|
|
|
u8 new_weight, *new_weight_ptr = &new_weight;
|
|
@@ -595,7 +594,7 @@ static ssize_t lparcfg_write(struct file *file, const char __user * buf,
|
|
|
if (!firmware_has_feature(FW_FEATURE_SPLPAR))
|
|
|
return -EINVAL;
|
|
|
|
|
|
- if (count > kbuf_sz)
|
|
|
+ if (count > sizeof(kbuf))
|
|
|
return -EINVAL;
|
|
|
|
|
|
if (copy_from_user(kbuf, buf, count))
|