diff options
author | Borislav Petkov <bp@suse.de> | 2014-02-03 15:05:13 -0500 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2014-02-14 04:40:29 -0500 |
commit | 9da21b1509d8aa7ab4846722817d16c72d656c91 (patch) | |
tree | e21027dab66b50e1f21e3dd9b62846f7473bda8a /drivers/edac/edac_mc.c | |
parent | 4675348e78fab420e70f9144b320d9c063c7cee8 (diff) |
EDAC: Poll timeout cannot be zero, p2
Sanitize code even more to accept unsigned longs only and to not allow
polling intervals below 1 second as this is unnecessary and doesn't make
much sense anyway for polling errors.
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: http://lkml.kernel.org/r/1391457913-881-1-git-send-email-prarit@redhat.com
Cc: Doug Thompson <dougthompson@xmission.com>
Cc: <stable@vger.kernel.org>
Diffstat (limited to 'drivers/edac/edac_mc.c')
-rw-r--r-- | drivers/edac/edac_mc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c index e8c9ef03495b..aef5ec24908e 100644 --- a/drivers/edac/edac_mc.c +++ b/drivers/edac/edac_mc.c | |||
@@ -601,7 +601,7 @@ static void edac_mc_workq_teardown(struct mem_ctl_info *mci) | |||
601 | * user space has updated our poll period value, need to | 601 | * user space has updated our poll period value, need to |
602 | * reset our workq delays | 602 | * reset our workq delays |
603 | */ | 603 | */ |
604 | void edac_mc_reset_delay_period(int value) | 604 | void edac_mc_reset_delay_period(unsigned long value) |
605 | { | 605 | { |
606 | struct mem_ctl_info *mci; | 606 | struct mem_ctl_info *mci; |
607 | struct list_head *item; | 607 | struct list_head *item; |
@@ -611,7 +611,7 @@ void edac_mc_reset_delay_period(int value) | |||
611 | list_for_each(item, &mc_devices) { | 611 | list_for_each(item, &mc_devices) { |
612 | mci = list_entry(item, struct mem_ctl_info, link); | 612 | mci = list_entry(item, struct mem_ctl_info, link); |
613 | 613 | ||
614 | edac_mc_workq_setup(mci, (unsigned long) value); | 614 | edac_mc_workq_setup(mci, value); |
615 | } | 615 | } |
616 | 616 | ||
617 | mutex_unlock(&mem_ctls_mutex); | 617 | mutex_unlock(&mem_ctls_mutex); |