Re: [PATCH 7/7] tpm: Driver for next generation TPM chips
From: Andrew Morton
Date: Mon Apr 10 2006 - 19:04:28 EST
Kylene Jo Hall <kjhall@xxxxxxxxxx> wrote:
>
> This patch contains the driver for the next generation of TPM chips
> version 1.2 including support for interrupts. The Trusted Computing
> Group has written the TPM Interface Specification (TIS) which defines a
> common interface for all manufacturer's 1.2 TPM's thus the name
> tpm_tis.
>
> This updated version of the patch uses the new sysfs files that came
> about from the comments and changes in patch 6/7. It replaces the 7/7
> patch from the original set.
>
> Signed-off-by: Leendert van Doorn <leendert@xxxxxxxxxxxxxx>
> Signed-off-by: Kylene Hall <kjhall@xxxxxxxxxx>
I've assumed that Leendert is the author of this driver. If incorrect,
please let me know. If correct then the way in which we indicate that is
to put a From: line right at the top of the changelog.
> + interruptible_sleep_on_timeout(&chip->vendor.int_queue,
> + HZ *
> + chip->vendor.timeout_a /
> + 1000);
>
> ...
>
> + interruptible_sleep_on_timeout(queue, HZ * timeout / 1000);
Please don't use the sleep_on functions. They are racy unless (iirc) both
the waker and wakee are holding lock_kernel(). If the race hits, we miss a
wakeup.
These should be converted to the not-racy wait_event_interruptible().
-
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/