diff options
author | 2009-11-13 20:56:58 +0100 | |
---|---|---|
committer | 2009-11-24 13:02:18 +1000 | |
commit | a698cf34ea867efef12fc29dd63d443f0c71a53c (patch) | |
tree | a396804737c4a7bc972f04fe97d0ec0a2f971668 /lib/debugobjects.c | |
parent | drm/radeon/kms: Disable TV load detect on RS400,RC410,RS480 (diff) | |
download | wireguard-linux-a698cf34ea867efef12fc29dd63d443f0c71a53c.tar.xz wireguard-linux-a698cf34ea867efef12fc29dd63d443f0c71a53c.zip |
drm: mm always protect change to unused_nodes with unused_lock spinlock
unused_nodes modification needs to be protected by unused_lock spinlock.
Here is an example of an usage where there is no such protection without
this patch.
Process 1: 1-drm_mm_pre_get(this function modify unused_nodes list)
2-spin_lock(spinlock protecting mm struct)
3-drm_mm_put_block(this function might modify unused_nodes
list but doesn't protect modification with unused_lock)
4-spin_unlock(spinlock protecting mm struct)
Process2: 1-drm_mm_pre_get(this function modify unused_nodes list)
At this point Process1 & Process2 might both be doing modification to
unused_nodes list. This patch add unused_lock protection into
drm_mm_put_block to avoid such issue.
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'lib/debugobjects.c')
0 files changed, 0 insertions, 0 deletions