re: drm: Add helpers to kick off self refresh mode in drivers

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

 



Hi,

Static analysis with Coverity has picked up two potential issues with
the commit in linux-next:

commit 1452c25b0e60278820f3d2155c65f1bfcce5ee79
Author: Sean Paul <seanpaul@xxxxxxxxxxxx>
Date:   Wed Jun 12 10:50:19 2019 -0400

    drm: Add helpers to kick off self refresh mode in drivers

1. There is a potential null dereference on the following code path in
function drm_self_refresh_helper_entry_work:

        state = drm_atomic_state_alloc(dev);
        if (!state) {
                ret = -ENOMEM;
                goto out;
        }

..the exit path out calls drm_atomic_state_put(state) which dereferences
the null state.

2. The following error exit path to out in function
drm_self_refresh_helper_entry_work will check if ret is -EDEADLK however
ret has not been initialized at this point:

       if (!crtc_state->enable)
                goto out;

       ...

out:
       if (ret == -EDEADLK) {
            ...
       }


Colin
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://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