[lkml]   [2008]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 1/4] TPM: update char dev BKL pushdown
    On Tue, 23 Sep 2008 14:19:26 -0300
    Rajiv Andrade <> wrote:

    > + * It's assured that the chip will be opened just once,
    > + * by the check of is_open variable, which is protected
    > + * by driver_lock.

    Taking a look at the code, I'm convinced. BKL removal seems

    While I was in the neighborhood, though, something caught my eye:

    int tpm_release(struct inode *inode, struct file *file)
    struct tpm_chip *chip = file->private_data;


    Here you have waited until you've got nothing in the workqueue.

    file->private_data = NULL;

    But, until you get here, your timer could have resubmitted a job into
    the workqueue - job which could run after you've freed "chip" and
    forgotten all about it. I think you need either a "don't resubmit" flag,
    or you need to delete the timer first.


     \ /
      Last update: 2008-09-23 23:01    [W:0.021 / U:123.832 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site