Re: [tpmdd-devel] [PATCH] vTPM: Fix missing NULL check

2017-03-14 Thread Hon Ching(Vicky) Lo
On Wed, 2017-03-08 at 13:52 -0700, Jason Gunthorpe wrote: > On Wed, Mar 08, 2017 at 03:28:11PM -0500, Hon Ching(Vicky) Lo wrote: > > On Wed, 2017-03-08 at 10:17 -0700, Jason Gunthorpe wrote: > > > On Tue, Mar 07, 2017 at 11:12:43PM -0500, Hon Ching(Vicky) Lo wrote: > > > > On Mon, 2017-03-06 at

Re: [tpmdd-devel] [PATCH] vTPM: Fix missing NULL check

2017-03-14 Thread Hon Ching(Vicky) Lo
On Wed, 2017-03-08 at 13:52 -0700, Jason Gunthorpe wrote: > On Wed, Mar 08, 2017 at 03:28:11PM -0500, Hon Ching(Vicky) Lo wrote: > > On Wed, 2017-03-08 at 10:17 -0700, Jason Gunthorpe wrote: > > > On Tue, Mar 07, 2017 at 11:12:43PM -0500, Hon Ching(Vicky) Lo wrote: > > > > On Mon, 2017-03-06 at

Re: [tpmdd-devel] [PATCH] vTPM: Fix missing NULL check

2017-03-08 Thread Jason Gunthorpe
On Wed, Mar 08, 2017 at 03:28:11PM -0500, Hon Ching(Vicky) Lo wrote: > On Wed, 2017-03-08 at 10:17 -0700, Jason Gunthorpe wrote: > > On Tue, Mar 07, 2017 at 11:12:43PM -0500, Hon Ching(Vicky) Lo wrote: > > > On Mon, 2017-03-06 at 16:19 -0700, Jason Gunthorpe wrote: > > > > > > Also, how does

Re: [tpmdd-devel] [PATCH] vTPM: Fix missing NULL check

2017-03-08 Thread Jason Gunthorpe
On Wed, Mar 08, 2017 at 03:28:11PM -0500, Hon Ching(Vicky) Lo wrote: > On Wed, 2017-03-08 at 10:17 -0700, Jason Gunthorpe wrote: > > On Tue, Mar 07, 2017 at 11:12:43PM -0500, Hon Ching(Vicky) Lo wrote: > > > On Mon, 2017-03-06 at 16:19 -0700, Jason Gunthorpe wrote: > > > > > > Also, how does

Re: [tpmdd-devel] [PATCH] vTPM: Fix missing NULL check

2017-03-08 Thread Hon Ching(Vicky) Lo
On Wed, 2017-03-08 at 10:17 -0700, Jason Gunthorpe wrote: > On Tue, Mar 07, 2017 at 11:12:43PM -0500, Hon Ching(Vicky) Lo wrote: > > On Mon, 2017-03-06 at 16:19 -0700, Jason Gunthorpe wrote: > > > > Also, how does locking work here? Does the vio core prevent > > > tpm_ibmvtpm_get_desired_dma and

Re: [tpmdd-devel] [PATCH] vTPM: Fix missing NULL check

2017-03-08 Thread Hon Ching(Vicky) Lo
On Wed, 2017-03-08 at 10:17 -0700, Jason Gunthorpe wrote: > On Tue, Mar 07, 2017 at 11:12:43PM -0500, Hon Ching(Vicky) Lo wrote: > > On Mon, 2017-03-06 at 16:19 -0700, Jason Gunthorpe wrote: > > > > Also, how does locking work here? Does the vio core prevent > > > tpm_ibmvtpm_get_desired_dma and

Re: [tpmdd-devel] [PATCH] vTPM: Fix missing NULL check

2017-03-08 Thread Jason Gunthorpe
On Tue, Mar 07, 2017 at 11:12:43PM -0500, Hon Ching(Vicky) Lo wrote: > On Mon, 2017-03-06 at 16:19 -0700, Jason Gunthorpe wrote: > > Also, how does locking work here? Does the vio core prevent > > tpm_ibmvtpm_get_desired_dma and tpm_ibmvtpm_remove from running > > concurrently? > > No, vio core

Re: [tpmdd-devel] [PATCH] vTPM: Fix missing NULL check

2017-03-08 Thread Jason Gunthorpe
On Tue, Mar 07, 2017 at 11:12:43PM -0500, Hon Ching(Vicky) Lo wrote: > On Mon, 2017-03-06 at 16:19 -0700, Jason Gunthorpe wrote: > > Also, how does locking work here? Does the vio core prevent > > tpm_ibmvtpm_get_desired_dma and tpm_ibmvtpm_remove from running > > concurrently? > > No, vio core

Re: [tpmdd-devel] [PATCH] vTPM: Fix missing NULL check

2017-03-07 Thread Hon Ching(Vicky) Lo
On Mon, 2017-03-06 at 16:19 -0700, Jason Gunthorpe wrote: > On Mon, Mar 06, 2017 at 05:32:15PM -0500, Hon Ching(Vicky) Lo wrote: > > The current code passes the address of tpm_chip as the argument to > > dev_get_drvdata() without prior NULL check in > > tpm_ibmvtpm_get_desired_dma. This resulted

Re: [tpmdd-devel] [PATCH] vTPM: Fix missing NULL check

2017-03-07 Thread Hon Ching(Vicky) Lo
On Mon, 2017-03-06 at 16:19 -0700, Jason Gunthorpe wrote: > On Mon, Mar 06, 2017 at 05:32:15PM -0500, Hon Ching(Vicky) Lo wrote: > > The current code passes the address of tpm_chip as the argument to > > dev_get_drvdata() without prior NULL check in > > tpm_ibmvtpm_get_desired_dma. This resulted

Re: [tpmdd-devel] [PATCH] vTPM: Fix missing NULL check

2017-03-06 Thread Jason Gunthorpe
On Mon, Mar 06, 2017 at 05:32:15PM -0500, Hon Ching(Vicky) Lo wrote: > The current code passes the address of tpm_chip as the argument to > dev_get_drvdata() without prior NULL check in > tpm_ibmvtpm_get_desired_dma. This resulted an oops during kernel > boot when vTPM is enabled in Power

Re: [tpmdd-devel] [PATCH] vTPM: Fix missing NULL check

2017-03-06 Thread Jason Gunthorpe
On Mon, Mar 06, 2017 at 05:32:15PM -0500, Hon Ching(Vicky) Lo wrote: > The current code passes the address of tpm_chip as the argument to > dev_get_drvdata() without prior NULL check in > tpm_ibmvtpm_get_desired_dma. This resulted an oops during kernel > boot when vTPM is enabled in Power