Re: [PATCH 1/3] driver core/platform: don't leak memory allocated for dma_mask

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

 



On Mon, May 26, 2014 at 06:41:21PM +0200, Emil Goode wrote:
> @@ -211,6 +215,7 @@ struct platform_device *platform_device_alloc(const char *name, int id)
>  		strcpy(pa->name, name);
>  		pa->pdev.name = pa->name;
>  		pa->pdev.id = id;
> +		pa->pdev.dev.dma_mask = &pa->dma_mask;

There is code in the kernel which, rightly or wrongly, checks whether
dev->dma_mask is NULL to determine whether the device can do any kind
of DMA.  The above results in devices allocated via this interface
always having this member set, which is a change of core kernel behaviour.

How sure are you that this will not break anything?

-- 
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux