From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755424Ab1HWV4p (ORCPT ); Tue, 23 Aug 2011 17:56:45 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:51943 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752730Ab1HWV4h (ORCPT ); Tue, 23 Aug 2011 17:56:37 -0400 From: Christian Lamparter To: Alexey Khoroshilov Subject: Re: [PATCH] carl9170: Fix mismatch in carl9170_op_set_key mutex lock-unlock Date: Tue, 23 Aug 2011 23:56:22 +0200 User-Agent: KMail/1.13.7 (Linux/3.1.0-rc2-wl+; KDE/4.6.5; x86_64; ; ) Cc: "John W. Linville" , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, ldv-project@ispras.ru References: <1314132272-7357-1-git-send-email-khoroshilov@ispras.ru> In-Reply-To: <1314132272-7357-1-git-send-email-khoroshilov@ispras.ru> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201108232356.22472.chunkeey@googlemail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Cc: Acked-By: Christian Lamparter