All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Berger <stefanb@linux.ibm.com>
To: Saubhik Mukherjee <saubhik.mukherjee@gmail.com>,
	peterhuewe@gmx.de, jarkko@kernel.org, jgg@ziepe.ca
Cc: linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org,
	ldv-project@linuxtesting.org, andrianov@ispras.ru
Subject: Re: [PATCH v2] char: tpm: vtpm_proxy: Fix race in init
Date: Fri, 9 Jul 2021 14:18:50 -0400	[thread overview]
Message-ID: <86011d11-522d-a686-b360-43d19366cab7@linux.ibm.com> (raw)
In-Reply-To: <20210708095259.27915-1-saubhik.mukherjee@gmail.com>


On 7/8/21 5:52 AM, Saubhik Mukherjee wrote:
> vtpm_module_init calls vtpmx_init which calls misc_register. The file
> operations callbacks are registered. So, vtpmx_fops_ioctl can execute in
> parallel with rest of vtpm_module_init. vtpmx_fops_ioctl calls
> vtpmx_ioc_new_dev, which calls vtpm_proxy_create_device, which calls
> vtpm_proxy_work_start, which could read uninitialized workqueue.
>
> To avoid this, create workqueue before vtpmx init.
>
> Found by Linux Driver Verification project (linuxtesting.org).
>
> Fixes: 6f99612e2500 ("tpm: Proxy driver for supporting multiple emulated TPMs")
> Signed-off-by: Saubhik Mukherjee <saubhik.mukherjee@gmail.com>

Tested-by: Stefan Berger <stefanb@linux.ibm.com>



      parent reply	other threads:[~2021-07-09 18:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-08  9:52 [PATCH v2] char: tpm: vtpm_proxy: Fix race in init Saubhik Mukherjee
2021-07-09 17:37 ` Jarkko Sakkinen
2021-07-09 18:18 ` Stefan Berger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86011d11-522d-a686-b360-43d19366cab7@linux.ibm.com \
    --to=stefanb@linux.ibm.com \
    --cc=andrianov@ispras.ru \
    --cc=jarkko@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=ldv-project@linuxtesting.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    --cc=saubhik.mukherjee@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.