Re: [PATCH] drm: radeon: fix overflow on 32bit systems

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

 



On Wed, Nov 28, 2018 at 3:14 AM Christian König
<ckoenig.leichtzumerken@xxxxxxxxx> wrote:
>
> Am 27.11.18 um 12:50 schrieb Yang Xiao:
> > From: Young Xiao <YangX92@xxxxxxxxxxx>
> >
> > the type mem->start is unsigned long, so this can overflow on
> > 32bit system, since the type addr is uint64_t.
> >
> > Signed-off-by: Young Xiao <YangX92@xxxxxxxxxxx>
>
> Reviewed-by: Christian König <christian.koenig@xxxxxxx>
>

Applied.  thanks!

Alex

> > ---
> >   drivers/gpu/drm/radeon/radeon_vm.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/radeon/radeon_vm.c b/drivers/gpu/drm/radeon/radeon_vm.c
> > index 7f1a9c7..51559d8 100644
> > --- a/drivers/gpu/drm/radeon/radeon_vm.c
> > +++ b/drivers/gpu/drm/radeon/radeon_vm.c
> > @@ -946,7 +946,7 @@ int radeon_vm_bo_update(struct radeon_device *rdev,
> >               bo_va->flags &= ~RADEON_VM_PAGE_WRITEABLE;
> >
> >       if (mem) {
> > -             addr = mem->start << PAGE_SHIFT;
> > +             addr = (u64)mem->start << PAGE_SHIFT;
> >               if (mem->mem_type != TTM_PL_SYSTEM) {
> >                       bo_va->flags |= RADEON_VM_PAGE_VALID;
> >               }
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux