From: Alexander Gordeev Date: Thu, 13 Jan 2011 01:00:53 +0000 (-0800) Subject: pps: make idr lock a mutex and protect idr_pre_get X-Git-Tag: v2.6.38-rc1~288 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a5cd6e2fb1984cc83f08b3645bf394830ac7825;p=pandora-kernel.git pps: make idr lock a mutex and protect idr_pre_get Now pps_idr_lock is never used in interrupt context so we can replace spin_lock_irq/spin_unlock_irq with plain spin_lock/spin_unlock. But there is also a potential race condition when someone can steal an id which was allocated by idr_pre_get before it is used. So convert spin lock to mutex and protect the whole id generation process. Signed-off-by: Alexander Gordeev Cc: Rodolfo Giometti Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed