All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: QCA ath9k Development <ath9k-devel@qca.qualcomm.com>,
	Felix Fietkau <nbd@nbd.name>,
	linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] ath9k: Fix a locking bug in ath9k_add_interface()
Date: Wed, 24 Oct 2018 12:58:17 +0000	[thread overview]
Message-ID: <87woq7qz6e.fsf@codeaurora.org> (raw)
In-Reply-To: <20181024125630.pqs6uae3owjvfdhr@mwanda> (Dan Carpenter's message of "Wed, 24 Oct 2018 15:56:30 +0300")

Dan Carpenter <dan.carpenter@oracle.com> writes:

> On Wed, Oct 24, 2018 at 08:50:52AM +0300, Kalle Valo wrote:
>> Dan Carpenter <dan.carpenter@oracle.com> writes:
>> 
>> > We tried to revert commit d9c52fd17cb4 ("ath9k: fix tx99 with monitor
>> > mode interface") but accidentally missed part of the locking change.
>> >
>> > The lock has to be held earlier so that we're holding it when we do
>> > "sc->tx99_vif = vif;" and also there in the current code there is a
>> > stray unlock before we have taken the lock.
>> >
>> > Fixes: 6df0580be8bc ("ath9k: add back support for using active
>> > monitor interfaces for tx99")
>> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>> 
>> commit 6df0580be8bc is on it's way to v4.20 so should I also queue this
>> to v4.20?
>
> Yeah.  Obviously this is a static checker thing and I haven't tested it.
>
> I don't know if add_interface() is ever called in parallel, but I can
> imagine that it might be.  In that case the race condition is something
> that would affect real life.
>
> Anyway, it's a small obvious fix.

Ok, I'll then queue this to v4.20. But I would appreciate if others
could test or review this.

-- 
Kalle Valo

WARNING: multiple messages have this Message-ID (diff)
From: Kalle Valo <kvalo@codeaurora.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: QCA ath9k Development <ath9k-devel@qca.qualcomm.com>,
	Felix Fietkau <nbd@nbd.name>,
	linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] ath9k: Fix a locking bug in ath9k_add_interface()
Date: Wed, 24 Oct 2018 15:58:17 +0300	[thread overview]
Message-ID: <87woq7qz6e.fsf@codeaurora.org> (raw)
In-Reply-To: <20181024125630.pqs6uae3owjvfdhr@mwanda> (Dan Carpenter's message of "Wed, 24 Oct 2018 15:56:30 +0300")

Dan Carpenter <dan.carpenter@oracle.com> writes:

> On Wed, Oct 24, 2018 at 08:50:52AM +0300, Kalle Valo wrote:
>> Dan Carpenter <dan.carpenter@oracle.com> writes:
>> 
>> > We tried to revert commit d9c52fd17cb4 ("ath9k: fix tx99 with monitor
>> > mode interface") but accidentally missed part of the locking change.
>> >
>> > The lock has to be held earlier so that we're holding it when we do
>> > "sc->tx99_vif = vif;" and also there in the current code there is a
>> > stray unlock before we have taken the lock.
>> >
>> > Fixes: 6df0580be8bc ("ath9k: add back support for using active
>> > monitor interfaces for tx99")
>> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>> 
>> commit 6df0580be8bc is on it's way to v4.20 so should I also queue this
>> to v4.20?
>
> Yeah.  Obviously this is a static checker thing and I haven't tested it.
>
> I don't know if add_interface() is ever called in parallel, but I can
> imagine that it might be.  In that case the race condition is something
> that would affect real life.
>
> Anyway, it's a small obvious fix.

Ok, I'll then queue this to v4.20. But I would appreciate if others
could test or review this.

-- 
Kalle Valo

  reply	other threads:[~2018-10-24 12:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-19 20:08 [PATCH] ath9k: Fix a locking bug in ath9k_add_interface() Dan Carpenter
2018-10-19 20:08 ` Dan Carpenter
2018-10-24  5:50 ` Kalle Valo
2018-10-24  5:50   ` Kalle Valo
2018-10-24 12:56   ` Dan Carpenter
2018-10-24 12:56     ` Dan Carpenter
2018-10-24 12:58     ` Kalle Valo [this message]
2018-10-24 12:58       ` Kalle Valo
2018-11-06 16:43 ` Kalle Valo
2018-11-06 16:43   ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87woq7qz6e.fsf@codeaurora.org \
    --to=kvalo@codeaurora.org \
    --cc=ath9k-devel@qca.qualcomm.com \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nbd@nbd.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.