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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 25 May 2010 18:10:04 -0400
From:	Prarit Bhargava <prarit@...hat.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	linux-kernel@...r.kernel.org, stable@...nel.org,
	david.altobelli@...com, "Camuso, Tony" <Tony.Camuso@...com>
Subject: Re: [PATCH]: hpilo: fix pointer warning in ilo_ccb_setup



On 05/25/2010 05:49 PM, Andrew Morton wrote:
> On Fri, 21 May 2010 20:50:41 -0400
> Prarit Bhargava<prarit@...hat.com>  wrote:
>
>    
>> Fixes warning:
>>
>> drivers/misc/hpilo.c: In function ___ilo_ccb_setup___:
>> drivers/misc/hpilo.c:274: warning: cast to pointer from integer of different size
>>
>> Signed-off-by: Prarit Bhargava<prarit@...hat.com>
>>
>> diff --git a/drivers/misc/hpilo.c b/drivers/misc/hpilo.c
>> index 98ad012..b07a541 100644
>> --- a/drivers/misc/hpilo.c
>> +++ b/drivers/misc/hpilo.c
>> @@ -272,7 +272,7 @@ static int ilo_ccb_setup(struct ilo_hwinfo *hw, struct ccb_data *data, int slot)
>>   		return -ENOMEM;
>>
>>   	dma_va = (char *)data->dma_va;
>> -	dma_pa = (char *)data->dma_pa;
>> +	dma_pa = (char *)(&data->dma_pa);
>>
>>   	memset(dma_va, 0, data->dma_size);
>>      
> Seems very wrong - writes to *dmp_pa will now scribble over the `struct
> ccb_data'.
>
> Probably local variable dma_pa should have type dma_addr_t.
>    

Ugh ... I even passed this by a colleague at HP :/.  I'll fix it up and 
repost.

P.

--
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