Skip to content
Commit 4502c43d authored by Dave Stevenson's avatar Dave Stevenson Committed by Greg Kroah-Hartman
Browse files

staging: bcm2835-camera: Replace spinlock protecting context_map with mutex



commit 8dedab29 upstream.

The commit "staging: bcm2835-camera: Replace open-coded idr with a struct idr."
replaced an internal implementation of an idr with the standard functions
and a spinlock. idr_alloc(GFP_KERNEL) can sleep whilst calling kmem_cache_alloc
to allocate the new node, but this is not valid whilst in an atomic context
due to the spinlock.

There is no need for this to be a spinlock as a standard mutex is
sufficient.

Fixes: 950fd867 ("staging: bcm2835-camera: Replace open-coded idr with a struct idr.")
Signed-off-by: default avatarDave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: default avatarStefan Wahren <wahrenst@gmx.net>
Acked-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 22a20b9f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment