aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
diff options
context:
space:
mode:
authorTom Parkin <[email protected]>2020-07-24 15:31:53 +0000
committerDavid S. Miller <[email protected]>2020-07-25 00:19:14 +0000
commit1aa646ac71feb987a9571e1d70980d10ff495fbc (patch)
treeadc957c6c656ed86abc5f4dd7655d492db5e9d37 /drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
parentl2tp: remove BUG_ON in l2tp_tunnel_closeall (diff)
downloadkernel-1aa646ac71feb987a9571e1d70980d10ff495fbc.tar.gz
kernel-1aa646ac71feb987a9571e1d70980d10ff495fbc.zip
l2tp: don't BUG_ON session magic checks in l2tp_ppp
checkpatch advises that WARN_ON and recovery code are preferred over BUG_ON which crashes the kernel. l2tp_ppp.c's BUG_ON checks of the l2tp session structure's "magic" field occur in code paths where it's reasonably easy to recover: * In the case of pppol2tp_sock_to_session, we can return NULL and the caller will bail out appropriately. There is no change required to any of the callsites of this function since they already handle pppol2tp_sock_to_session returning NULL. * In the case of pppol2tp_session_destruct we can just avoid decrementing the reference count on the suspect session structure. In the worst case scenario this results in a memory leak, which is preferable to a crash. Convert these uses of BUG_ON to WARN_ON accordingly. Signed-off-by: Tom Parkin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c')
0 files changed, 0 insertions, 0 deletions