mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Peter Hüwe" <PeterHuewe@gmx.de>
To: "Hon Ching(Vicky) Lo" <honclo@linux.vnet.ibm.com>
Cc: tpmdd-devel@lists.sourceforge.net,
	Ashley Lai <ashley@ashleylai.com>,
	Vicky Lo <honclo2014@gmail.com>,
	linux-kernel@vger.kernel.org,
	Joy Latten <jmlatten@linux.vnet.ibm.com>
Subject: Re: [PATCH] vTPM: set virtual device before passing to ibmvtpm_reset_crq
Date: Tue, 16 Jun 2015 22:37:27 +0200	[thread overview]
Message-ID: <201506162237.28679.PeterHuewe@gmx.de> (raw)
In-Reply-To: <1432315382-11711-1-git-send-email-honclo@linux.vnet.ibm.com>

Hey,

Am Freitag, 22. Mai 2015, 19:23:02 schrieb Hon Ching(Vicky) Lo:
> tpm_ibmvtpm_probe() calls ibmvtpm_reset_crq(ibmvtpm) without having yet
> set the virtual device in the ibmvtpm structure. So in ibmvtpm_reset_crq,
> the phype call contains empty unit addresses, ibmvtpm->vdev->unit_address.
> 
> Signed-off-by: Hon Ching(Vicky) Lo <honclo@linux.vnet.ibm.com>
> Signed-off-by: Joy Latten <jmlatten@linux.vnet.ibm.com>
> ---
>  drivers/char/tpm/tpm_ibmvtpm.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/char/tpm/tpm_ibmvtpm.c
> b/drivers/char/tpm/tpm_ibmvtpm.c index 42ffa5e..27ebf95 100644
> --- a/drivers/char/tpm/tpm_ibmvtpm.c
> +++ b/drivers/char/tpm/tpm_ibmvtpm.c
> @@ -578,6 +578,9 @@ static int tpm_ibmvtpm_probe(struct vio_dev *vio_dev,
>  		goto cleanup;
>  	}
> 
> +	ibmvtpm->dev = dev;
> +	ibmvtpm->vdev = vio_dev;
> +
>  	crq_q = &ibmvtpm->crq_queue;
>  	crq_q->crq_addr = (struct ibmvtpm_crq *)get_zeroed_page(GFP_KERNEL);
>  	if (!crq_q->crq_addr) {
> @@ -622,8 +625,6 @@ static int tpm_ibmvtpm_probe(struct vio_dev *vio_dev,
> 
>  	crq_q->index = 0;
> 
> -	ibmvtpm->dev = dev;
> -	ibmvtpm->vdev = vio_dev;
>  	TPM_VPRIV(chip) = (void *)ibmvtpm;
> 
>  	spin_lock_init(&ibmvtpm->rtce_lock);

Is this a fix for something?
does it need to go through stable?

Thanks,
Peter

  parent reply	other threads:[~2015-06-16 20:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-22 17:23 Hon Ching(Vicky) Lo
2015-06-02  5:50 ` Ashley Lai
2015-06-16 20:37 ` Peter Hüwe [this message]
2015-06-16 21:18   ` Hon Ching (Vicky) Lo

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=201506162237.28679.PeterHuewe@gmx.de \
    --to=peterhuewe@gmx.de \
    --cc=ashley@ashleylai.com \
    --cc=honclo2014@gmail.com \
    --cc=honclo@linux.vnet.ibm.com \
    --cc=jmlatten@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tpmdd-devel@lists.sourceforge.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®