]>
Commit | Line | Data |
---|---|---|
04fd09d4 SL |
1 | From 799adb2c20be04602db4a40969a71ebe6a2ddaf4 Mon Sep 17 00:00:00 2001 |
2 | From: Buland Singh <bsingh@redhat.com> | |
3 | Date: Thu, 20 Dec 2018 17:35:24 +0530 | |
4 | Subject: hpet: Fix missing '=' character in the __setup() code of | |
5 | hpet_mmap_enable | |
6 | ||
7 | [ Upstream commit 24d48a61f2666630da130cc2ec2e526eacf229e3 ] | |
8 | ||
9 | Commit '3d035f580699 ("drivers/char/hpet.c: allow user controlled mmap for | |
10 | user processes")' introduced a new kernel command line parameter hpet_mmap, | |
11 | that is required to expose the memory map of the HPET registers to | |
12 | user-space. Unfortunately the kernel command line parameter 'hpet_mmap' is | |
13 | broken and never takes effect due to missing '=' character in the __setup() | |
14 | code of hpet_mmap_enable. | |
15 | ||
16 | Before this patch: | |
17 | ||
18 | dmesg output with the kernel command line parameter hpet_mmap=1 | |
19 | ||
20 | [ 0.204152] HPET mmap disabled | |
21 | ||
22 | dmesg output with the kernel command line parameter hpet_mmap=0 | |
23 | ||
24 | [ 0.204192] HPET mmap disabled | |
25 | ||
26 | After this patch: | |
27 | ||
28 | dmesg output with the kernel command line parameter hpet_mmap=1 | |
29 | ||
30 | [ 0.203945] HPET mmap enabled | |
31 | ||
32 | dmesg output with the kernel command line parameter hpet_mmap=0 | |
33 | ||
34 | [ 0.204652] HPET mmap disabled | |
35 | ||
36 | Fixes: 3d035f580699 ("drivers/char/hpet.c: allow user controlled mmap for user processes") | |
37 | Signed-off-by: Buland Singh <bsingh@redhat.com> | |
38 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
39 | Signed-off-by: Sasha Levin <sashal@kernel.org> | |
40 | --- | |
41 | drivers/char/hpet.c | 2 +- | |
42 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
43 | ||
44 | diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c | |
45 | index b941e6d59fd6..9dfb28b04559 100644 | |
46 | --- a/drivers/char/hpet.c | |
47 | +++ b/drivers/char/hpet.c | |
48 | @@ -377,7 +377,7 @@ static __init int hpet_mmap_enable(char *str) | |
49 | pr_info("HPET mmap %s\n", hpet_mmap_enabled ? "enabled" : "disabled"); | |
50 | return 1; | |
51 | } | |
52 | -__setup("hpet_mmap", hpet_mmap_enable); | |
53 | +__setup("hpet_mmap=", hpet_mmap_enable); | |
54 | ||
55 | static int hpet_mmap(struct file *file, struct vm_area_struct *vma) | |
56 | { | |
57 | -- | |
58 | 2.19.1 | |
59 |