Re: [tpmdd-devel] [PATCH v4 2/8] tpm: replace dynamically allocated bios_dir with dentry array

2016-10-01 Thread Jarkko Sakkinen
On Wed, Sep 28, 2016 at 04:34:36AM -0400, Nayna Jain wrote: > bios_dir is defined as struct dentry **bios_dir, which results in > dynamic allocation and therefore possibly a memory leak. This patch > replaces it with struct dentry array(struct dentry *bios_dir[3]) > similar to what is done for

Re: [tpmdd-devel] [PATCH v4 2/8] tpm: replace dynamically allocated bios_dir with dentry array

2016-10-01 Thread Jarkko Sakkinen
On Fri, Sep 30, 2016 at 02:31:47PM -0600, Jason Gunthorpe wrote: > On Fri, Sep 30, 2016 at 10:48:25PM +0300, Jarkko Sakkinen wrote: > > On Fri, Sep 30, 2016 at 12:30:26PM -0600, Jason Gunthorpe wrote: > > > On Fri, Sep 30, 2016 at 09:27:03PM +0300, Jarkko Sakkinen wrote: > > > > On Wed, Sep 28,

Re: [tpmdd-devel] [PATCH v4 2/8] tpm: replace dynamically allocated bios_dir with dentry array

2016-09-30 Thread Jason Gunthorpe
On Fri, Sep 30, 2016 at 10:48:25PM +0300, Jarkko Sakkinen wrote: > On Fri, Sep 30, 2016 at 12:30:26PM -0600, Jason Gunthorpe wrote: > > On Fri, Sep 30, 2016 at 09:27:03PM +0300, Jarkko Sakkinen wrote: > > > On Wed, Sep 28, 2016 at 04:34:36AM -0400, Nayna Jain wrote: > > > > > > - struct

Re: [tpmdd-devel] [PATCH v4 2/8] tpm: replace dynamically allocated bios_dir with dentry array

2016-09-30 Thread Jarkko Sakkinen
On Fri, Sep 30, 2016 at 12:30:26PM -0600, Jason Gunthorpe wrote: > On Fri, Sep 30, 2016 at 09:27:03PM +0300, Jarkko Sakkinen wrote: > > On Wed, Sep 28, 2016 at 04:34:36AM -0400, Nayna Jain wrote: > > > > - struct dentry **bios_dir; > > > + struct dentry *bios_dir[3]; > > > + unsigned int

Re: [tpmdd-devel] [PATCH v4 2/8] tpm: replace dynamically allocated bios_dir with dentry array

2016-09-30 Thread Jarkko Sakkinen
On Wed, Sep 28, 2016 at 04:34:36AM -0400, Nayna Jain wrote: > bios_dir is defined as struct dentry **bios_dir, which results in > dynamic allocation and therefore possibly a memory leak. This patch > replaces it with struct dentry array(struct dentry *bios_dir[3]) > similar to what is done for