Skip to content

Commit 4f542e3

Browse files
agotorvalds
authored andcommitted
pps: claim parallel port exclusively
Both pps_parport and pps_gen_parport are written in a way that they can't share a port with any other driver. This can result in locking up the process that loads modules or even the whole kernel if the modules are compiled in. Use PARPORT_FLAG_EXCL to indicate this. Signed-off-by: Alexander Gordeev <lasaine@lvk.cs.msu.su> Cc: Alexander Gordeev <lasaine@lvk.cs.msu.su> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent a783ac4 commit 4f542e3

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/pps/clients/pps_parport.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ static void parport_attach(struct parport *port)
163163
}
164164

165165
device->pardev = parport_register_device(port, KBUILD_MODNAME,
166-
NULL, NULL, parport_irq, 0, device);
166+
NULL, NULL, parport_irq, PARPORT_FLAG_EXCL, device);
167167
if (!device->pardev) {
168168
pr_err("couldn't register with %s\n", port->name);
169169
goto err_free;

‎drivers/pps/generators/pps_gen_parport.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ static void parport_attach(struct parport *port)
198198
}
199199

200200
device.pardev = parport_register_device(port, KBUILD_MODNAME,
201-
NULL, NULL, NULL, 0, &device);
201+
NULL, NULL, NULL, PARPORT_FLAG_EXCL, &device);
202202
if (!device.pardev) {
203203
pr_err("couldn't register with %s\n", port->name);
204204
return;

0 commit comments

Comments
 (0)