summaryrefslogtreecommitdiffstats
path: root/drivers/md/raid5.c
diff options
context:
space:
mode:
authorCorey Minyard2017-11-02 17:19:15 +0100
committerCorey Minyard2017-11-02 17:19:15 +0100
commit6297fabd93f93182245383ba7de56bef829a796b (patch)
tree804f5d28ada61b402d56281c9a047308d26347f4 /drivers/md/raid5.c
parentipmi_si: Delete an error message for a failed memory allocation in try_smi_in... (diff)
parentmodule: Do not paper over type mismatches in module_param_call() (diff)
downloadkernel-qcow2-linux-6297fabd93f93182245383ba7de56bef829a796b.tar.gz
kernel-qcow2-linux-6297fabd93f93182245383ba7de56bef829a796b.tar.xz
kernel-qcow2-linux-6297fabd93f93182245383ba7de56bef829a796b.zip
Merge branch 'modules-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux into for-next
The IPMI SI driver was split into different pieces, merge the module tree to accountfor that. Signed-off-by: Corey Minyard <cminyard@mvista.com>
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r--drivers/md/raid5.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 076409455b60..928e24a07133 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -6575,14 +6575,17 @@ static ssize_t
raid5_store_group_thread_cnt(struct mddev *mddev, const char *page, size_t len)
{
struct r5conf *conf;
- unsigned long new;
+ unsigned int new;
int err;
struct r5worker_group *new_groups, *old_groups;
int group_cnt, worker_cnt_per_group;
if (len >= PAGE_SIZE)
return -EINVAL;
- if (kstrtoul(page, 10, &new))
+ if (kstrtouint(page, 10, &new))
+ return -EINVAL;
+ /* 8192 should be big enough */
+ if (new > 8192)
return -EINVAL;
err = mddev_lock(mddev);