Skip to content

Commit

Permalink
pti: double-free security PTI fix
Browse files Browse the repository at this point in the history
This patch fixes a double-free error that will not always be
seen unless /dev/pti char interface is stressed.

Signed-off-by: J Freyensee <james_p_freyensee@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
J Freyensee authored and Greg Kroah-Hartman committed Jun 7, 2011
1 parent 9d031d9 commit 29021bc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/misc/pti.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,8 @@ EXPORT_SYMBOL_GPL(pti_request_masterchannel);
* a master, channel ID address
* used to write to PTI HW.
*
* @mc: master, channel apeture ID address to be released.
* @mc: master, channel apeture ID address to be released. This
* will de-allocate the structure via kfree().
*/
void pti_release_masterchannel(struct pti_masterchannel *mc)
{
Expand Down Expand Up @@ -581,7 +582,7 @@ static int pti_char_open(struct inode *inode, struct file *filp)
static int pti_char_release(struct inode *inode, struct file *filp)
{
pti_release_masterchannel(filp->private_data);
kfree(filp->private_data);
filp->private_data = NULL;
return 0;
}

Expand Down

0 comments on commit 29021bc

Please sign in to comment.