lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 17 Jun 2013 19:31:06 +0800
From:	Xiang Wang <wangxfdu@...il.com>
To:	unlisted-recipients:; (no To-header on input)
Cc:	Dan Williams <djbw@...com>, Vinod Koul <vinod.koul@...el.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	cxie4@...vell.com, Xiang Wang <wangx@...vell.com>
Subject: Re: [PATCH] dma: mmp_pdma: fix a memory alloc error

2013/5/31 Xiang Wang <wangxfdu@...il.com>:
> 2013/5/28 Andy Shevchenko <andy.shevchenko@...il.com>:
>> On Tue, May 28, 2013 at 3:05 PM, Xiang Wang <wangxfdu@...il.com> wrote:
>>> From: Xiang Wang <wangx@...vell.com>
>>>
>>> pdev->phy is of type "struct mmp_pdma_phy *". But when
>>> allocating memory for it, "struct mmp_pdma_chan" is used
>>> by mistake.
>>
>> Have you tested it?
>>
>>> Signed-off-by: Xiang Wang <wangx@...vell.com>
>>> ---
>>>  drivers/dma/mmp_pdma.c |    2 +-
>>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/drivers/dma/mmp_pdma.c b/drivers/dma/mmp_pdma.c
>>> index c26699f..76a8dcf 100644
>>> --- a/drivers/dma/mmp_pdma.c
>>> +++ b/drivers/dma/mmp_pdma.c
>>> @@ -801,7 +801,7 @@ static int mmp_pdma_probe(struct platform_device *op)
>>>         }
>>>
>>>         pdev->phy = devm_kzalloc(pdev->dev,
>>> -               dma_channels * sizeof(struct mmp_pdma_chan), GFP_KERNEL);
>>> +               dma_channels * sizeof(struct mmp_pdma_phy), GFP_KERNEL);
>>
>> For me it seems you did get how it works.
>>
>> --
>> With Best Regards,
>> Andy Shevchenko
>
> Hi, Andy
> Yes. I've tested on marvell pxa988 platform using dmatest.ko.

Hi, All
Do you have any comments about this patch? Thanks!

--
Regards,
Xiang
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ