pti: double-free security PTI fix
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>
This commit is contained in:
parent
9d031d94da
commit
29021bccea
|
@ -317,7 +317,8 @@ EXPORT_SYMBOL_GPL(pti_request_masterchannel);
|
||||||
* a master, channel ID address
|
* a master, channel ID address
|
||||||
* used to write to PTI HW.
|
* 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)
|
void pti_release_masterchannel(struct pti_masterchannel *mc)
|
||||||
{
|
{
|
||||||
|
@ -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)
|
static int pti_char_release(struct inode *inode, struct file *filp)
|
||||||
{
|
{
|
||||||
pti_release_masterchannel(filp->private_data);
|
pti_release_masterchannel(filp->private_data);
|
||||||
kfree(filp->private_data);
|
filp->private_data = NULL;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue