From: Wei Yongjun Date: Tue, 21 Apr 2020 12:40:09 +0000 (+0100) Subject: rpmsg: glink: Fix missing mutex_init() in qcom_glink_alloc_channel() X-Git-Tag: v4.14.177~41 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bb8ca3d39feca1c07cc138ef16675a3ce690b469;p=thirdparty%2Fkernel%2Fstable.git rpmsg: glink: Fix missing mutex_init() in qcom_glink_alloc_channel() [ Upstream commit fb416f69900773d5a6030c909114099f92d07ab9 ] qcom_glink_alloc_channel() allocates the mutex but not initialize it. Use mutex_init() on it to initialize it correctly. This is detected by Coccinelle semantic patch. Signed-off-by: Wei Yongjun Signed-off-by: Bjorn Andersson Signed-off-by: Lee Jones Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c index 114481c9fba12..7802663efe332 100644 --- a/drivers/rpmsg/qcom_glink_native.c +++ b/drivers/rpmsg/qcom_glink_native.c @@ -221,6 +221,7 @@ static struct glink_channel *qcom_glink_alloc_channel(struct qcom_glink *glink, /* Setup glink internal glink_channel data */ spin_lock_init(&channel->recv_lock); spin_lock_init(&channel->intent_lock); + mutex_init(&channel->intent_req_lock); channel->glink = glink; channel->name = kstrdup(name, GFP_KERNEL);