From: Jerome Glisse Date: Fri, 13 Nov 2009 19:56:58 +0000 (+0100) Subject: drm: mm always protect change to unused_nodes with unused_lock spinlock X-Git-Tag: v2.6.32~51^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a698cf34ea867efef12fc29dd63d443f0c71a53c;p=pandora-kernel.git 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 Signed-off-by: Dave Airlie --- Reading git-diff-tree failed