Re: [patch 2.6.26] /dev/hpet - fixes and cleanup

From: David Brownell
Date: Wed Jul 23 2008 - 12:50:39 EST


On Wednesday 23 July 2008, David Brownell wrote:
> On Wednesday 23 July 2008, Clemens Ladisch wrote:
> > David Brownell wrote:
> > >   * Tighten and correct the userspace interface code
> > >       ...
> > >       + only open comparators that have an interrupt, and can thus
> > >         perform "real work"
> >
> > This prevents userspace applications from doing mmap() on /dev/hpet
> > even if there is no interrupt.
>
> OK, I removed that ... HPET_IE_ON will already fail.

This change will be included in the next version of this patch, which
I'll send after other responses get more of a chance to trickle in.
(That line already changed because of the hd_task elimination.)

--- g26.orig/drivers/char/hpet.c 2008-07-23 09:43:59.000000000 -0700
+++ g26/drivers/char/hpet.c 2008-07-23 09:03:34.000000000 -0700
@@ -189,8 +189,7 @@ static int hpet_open(struct inode *inode

for (devp = NULL, hpetp = hpets; hpetp && !devp; hpetp = hpetp->hp_next)
for (i = 0; i < hpetp->hp_ntimer; i++)
- if (hpetp->hp_dev[i].hd_flags & HPET_OPEN
- || !hpetp->hp_dev[i].hd_hdwirq)
+ if (hpetp->hp_dev[i].hd_flags & HPET_OPEN)
continue;
else {
devp = &hpetp->hp_dev[i];
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/