From: Alex Elder Date: Thu, 16 Oct 2014 11:35:25 +0000 (-0500) Subject: greybus: unlock gbuf mutex on free X-Git-Tag: v4.9-rc1~119^2~378^2~21^2~2018 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ad8cd0d643f0c3f86755a0169bb7c9597005fa8e;p=karo-tx-linux.git greybus: unlock gbuf mutex on free To drop a reference on a gbuf, greybus_free_gbuf() is called. That uses kref_put_mutex() to drop the refernce under protection of gbuf_mutex. However the release routine, free_gbuf(), never releases the mutex as it should. Fix that. Signed-off-by: Alex Elder Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/gbuf.c b/drivers/staging/greybus/gbuf.c index 2ef6ead8ed17..a33dbb417312 100644 --- a/drivers/staging/greybus/gbuf.c +++ b/drivers/staging/greybus/gbuf.c @@ -82,6 +82,7 @@ static void free_gbuf(struct kref *kref) gbuf->connection->hd->driver->free_gbuf_data(gbuf); kmem_cache_free(gbuf_head_cache, gbuf); + mutex_unlock(&gbuf_mutex); } void greybus_free_gbuf(struct gbuf *gbuf)