Re: [PATCH] drm/nouveau: avoid null deref on bad arguments to nouveau_vma_getmap

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

 



On Wed, Sep 25, 2013 at 05:42:46PM +0300, Pasi Kärkkäinen wrote:
> On Wed, Sep 04, 2013 at 08:59:13AM +0200, Maarten Lankhorst wrote:
> > 
> > When looking into this bug I noticed that nouveau_bo_vma_add needs to have a check for nvbo->page_shift == vma->vm->vmm->spg_shift,
> > and only if the check is true it should map the page in TTM_PL_TT. Patch below.
> > Should probably also be cc'd to stable.
> >
> 
> How about this patch? Is it ready to go in? 
>

Ping on this patch aswell..


-- Pasi

 
> Thanks,
> 
> -- Pasi
> 
>  
> > ~Maarten
> > 
> > diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
> > index 89b992e..355a1b7 100644
> > --- a/drivers/gpu/drm/nouveau/nouveau_bo.c
> > +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
> > @@ -1560,7 +1560,8 @@ nouveau_bo_vma_add(struct nouveau_bo *nvbo, struct nouveau_vm *vm,
> >  
> >  	if (nvbo->bo.mem.mem_type == TTM_PL_VRAM)
> >  		nouveau_vm_map(vma, nvbo->bo.mem.mm_node);
> > -	else if (nvbo->bo.mem.mem_type == TTM_PL_TT) {
> > +	else if (nvbo->bo.mem.mem_type == TTM_PL_TT &&
> > +		 nvbo->page_shift == vma->vm->vmm->spg_shift) {
> >  		if (node->sg)
> >  			nouveau_vm_map_sg_table(vma, 0, size, node);
> >  		else
> > 
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux