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] [day] [month] [year] [list]
Message-ID: <51BECC91.90809@suse.cz>
Date:	Mon, 17 Jun 2013 10:45:05 +0200
From:	Jiri Slaby <jslaby@...e.cz>
To:	Marcin Slusarz <marcin.slusarz@...il.com>, bskeggs@...hat.com
CC:	Jiri Slaby <jirislaby@...il.com>, dri-devel@...ts.freedesktop.org,
	LKML <linux-kernel@...r.kernel.org>,
	stable <stable@...r.kernel.org>
Subject: Re: WARNING: at drivers/gpu/drm/nouveau/core/core/mm.c:242

On 03/13/2013 11:36 AM, Jiri Slaby wrote:
> On 02/19/2013 11:32 PM, Marcin Slusarz wrote:
>> On Tue, Feb 19, 2013 at 08:07:44AM +0100, Marcin Slusarz wrote:
>>> On Tue, Feb 19, 2013 at 12:43:06AM +0100, Jiri Slaby wrote:
>>>> On 02/19/2013 12:23 AM, Marcin Slusarz wrote:
>>>>> Tomorrow I'll post a patch for page allocation failure.
>>>>
>>>> What do you mean -- what kind of patch?
>>>
>>> A patch which will change pgt allocation to use vmalloc.
> 
> It's still not in -next. Any plans on this?

Ping...

>> ---
>> From: Marcin Slusarz <marcin.slusarz@...il.com>
>> Subject: [PATCH] drm/nouveau: use vmalloc for pgt allocation
>>
>> Page tables on nv50 take 48kB, which can be hard to allocate in one piece.
>> Let's use vmalloc.
>>
>> Signed-off-by: Marcin Slusarz <marcin.slusarz@...il.com>
>> Cc: stable@...r.kernel.org
>> ---
>>  drivers/gpu/drm/nouveau/core/subdev/vm/base.c | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/nouveau/core/subdev/vm/base.c b/drivers/gpu/drm/nouveau/core/subdev/vm/base.c
>> index 77c67fc..e66fb77 100644
>> --- a/drivers/gpu/drm/nouveau/core/subdev/vm/base.c
>> +++ b/drivers/gpu/drm/nouveau/core/subdev/vm/base.c
>> @@ -362,7 +362,7 @@ nouveau_vm_create(struct nouveau_vmmgr *vmm, u64 offset, u64 length,
>>  	vm->fpde = offset >> (vmm->pgt_bits + 12);
>>  	vm->lpde = (offset + length - 1) >> (vmm->pgt_bits + 12);
>>  
>> -	vm->pgt  = kcalloc(vm->lpde - vm->fpde + 1, sizeof(*vm->pgt), GFP_KERNEL);
>> +	vm->pgt  = vzalloc((vm->lpde - vm->fpde + 1) * sizeof(*vm->pgt));
>>  	if (!vm->pgt) {
>>  		kfree(vm);
>>  		return -ENOMEM;
>> @@ -371,7 +371,7 @@ nouveau_vm_create(struct nouveau_vmmgr *vmm, u64 offset, u64 length,
>>  	ret = nouveau_mm_init(&vm->mm, mm_offset >> 12, mm_length >> 12,
>>  			      block >> 12);
>>  	if (ret) {
>> -		kfree(vm->pgt);
>> +		vfree(vm->pgt);
>>  		kfree(vm);
>>  		return ret;
>>  	}
>> @@ -446,7 +446,7 @@ nouveau_vm_del(struct nouveau_vm *vm)
>>  	}
>>  
>>  	nouveau_mm_fini(&vm->mm);
>> -	kfree(vm->pgt);
>> +	vfree(vm->pgt);
>>  	kfree(vm);
>>  }
>>  
>>
> 
> 


-- 
js
suse labs
--
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