]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.14.111/hpet-fix-missing-character-in-the-__setup-code-of-hp.patch
Linux 4.14.111
[thirdparty/kernel/stable-queue.git] / releases / 4.14.111 / hpet-fix-missing-character-in-the-__setup-code-of-hp.patch
CommitLineData
04fd09d4
SL
1From 799adb2c20be04602db4a40969a71ebe6a2ddaf4 Mon Sep 17 00:00:00 2001
2From: Buland Singh <bsingh@redhat.com>
3Date: Thu, 20 Dec 2018 17:35:24 +0530
4Subject: hpet: Fix missing '=' character in the __setup() code of
5 hpet_mmap_enable
6
7[ Upstream commit 24d48a61f2666630da130cc2ec2e526eacf229e3 ]
8
9Commit '3d035f580699 ("drivers/char/hpet.c: allow user controlled mmap for
10user processes")' introduced a new kernel command line parameter hpet_mmap,
11that is required to expose the memory map of the HPET registers to
12user-space. Unfortunately the kernel command line parameter 'hpet_mmap' is
13broken and never takes effect due to missing '=' character in the __setup()
14code of hpet_mmap_enable.
15
16Before this patch:
17
18dmesg output with the kernel command line parameter hpet_mmap=1
19
20[ 0.204152] HPET mmap disabled
21
22dmesg output with the kernel command line parameter hpet_mmap=0
23
24[ 0.204192] HPET mmap disabled
25
26After this patch:
27
28dmesg output with the kernel command line parameter hpet_mmap=1
29
30[ 0.203945] HPET mmap enabled
31
32dmesg output with the kernel command line parameter hpet_mmap=0
33
34[ 0.204652] HPET mmap disabled
35
36Fixes: 3d035f580699 ("drivers/char/hpet.c: allow user controlled mmap for user processes")
37Signed-off-by: Buland Singh <bsingh@redhat.com>
38Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
39Signed-off-by: Sasha Levin <sashal@kernel.org>
40---
41 drivers/char/hpet.c | 2 +-
42 1 file changed, 1 insertion(+), 1 deletion(-)
43
44diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
45index 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--
582.19.1
59