diff options
author | Jerome Glisse <jglisse@redhat.com> | 2009-11-13 20:56:58 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-11-24 13:02:18 +1000 |
commit | a698cf34ea867efef12fc29dd63d443f0c71a53c (patch) | |
tree | a396804737c4a7bc972f04fe97d0ec0a2f971668 /drivers/gpu/drm/drm_pci.c | |
parent | 0beb81ab45c67de4b3aa85faad604cff8ed133a8 (diff) |
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 'drivers/gpu/drm/drm_pci.c')
0 files changed, 0 insertions, 0 deletions