Re: [PATCH] carl9170: Fix mismatch in carl9170_op_set_key mutex lock-unlock

From: Christian Lamparter
Date: Tue Aug 23 2011 - 17:56:48 EST


On Tuesday, August 23, 2011 10:44:32 PM Alexey Khoroshilov wrote:
> If is_main_vif(ar, vif) reports that we have to fall back
> to software encryption, we goto err_softw; before locking ar->mutex.
> As a result, we have unprotected call to carl9170_set_operating_mode
> and unmatched mutex_unlock.
>
> The patch fix the issue by adding mutex_lock before goto.
>
> Found by Linux Driver Verification project (linuxtesting.org).
>
> Signed-off-by: Alexey Khoroshilov <khoroshilov@xxxxxxxxx>
Cc: <stable@xxxxxxxxxx>
Acked-By: Christian Lamparter <chunkeey@xxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/