Re: [PATCH] PCI: sysfs: Fix failure path for addition of "vpd" attribute

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 13 Jan 2011 19:47:56 +0000
Ben Hutchings <bhutchings@xxxxxxxxxxxxxx> wrote:

> Commit 280c73d ("PCI: centralize the capabilities code in
> pci-sysfs.c") changed the initialisation of the "rom" and "vpd"
> attributes, and made the failure path for the "vpd" attribute
> incorrect.  We must free the new attribute structure (attr), but
> instead we currently free dev->vpd->attr.  That will normally be NULL,
> resulting in a memory leak, but it might be a stale pointer, resulting
> in a double-free.
> 
> Found by inspection; compile-tested only.
> 
> Signed-off-by: Ben Hutchings <bhutchings@xxxxxxxxxxxxxx>
> Cc: stable@xxxxxxxxxx
> ---

Applied to linux-next, thanks.  Stable seems optional as I'm not sure
if this has actually been reported as an issue anywhere.

Thanks,
-- 
Jesse Barnes, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux