From: Greg KH <gregkh@linuxfoundation.org>
To: Zubin Mithra <zsm@chromium.org>
Cc: stable@vger.kernel.org, groeck@chromium.org, mhjungk@gmail.com,
marcel@holtmann.org, johan.hedberg@gmail.com,
davem@davemloft.net
Subject: Re: [PATCH 4.4.y] Bluetooth: Fix decrementing reference count twice in releasing socket
Date: Wed, 3 Apr 2019 16:07:43 +0200 [thread overview]
Message-ID: <20190403140743.GG8633@kroah.com> (raw)
In-Reply-To: <20190401170142.138403-1-zsm@chromium.org>
On Mon, Apr 01, 2019 at 10:01:42AM -0700, Zubin Mithra wrote:
> From: Myungho Jung <mhjungk@gmail.com>
>
> commit e20a2e9c42c9e4002d9e338d74e7819e88d77162 upstream
>
> When releasing socket, it is possible to enter hci_sock_release() and
> hci_sock_dev_event(HCI_DEV_UNREG) at the same time in different thread.
> The reference count of hdev should be decremented only once from one of
> them but if storing hdev to local variable in hci_sock_release() before
> detached from socket and setting to NULL in hci_sock_dev_event(),
> hci_dev_put(hdev) is unexpectedly called twice. This is resolved by
> referencing hdev from socket after bt_sock_unlink() in
> hci_sock_release().
>
> Reported-by: syzbot+fdc00003f4efff43bc5b@syzkaller.appspotmail.com
> Signed-off-by: Myungho Jung <mhjungk@gmail.com>
> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
> Signed-off-by: Zubin Mithra <zsm@chromium.org>
Now applied, thanks.
greg k-h
prev parent reply other threads:[~2019-04-03 14:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-01 17:01 [PATCH 4.4.y] Bluetooth: Fix decrementing reference count twice in releasing socket Zubin Mithra
2019-04-03 14:07 ` Greg KH [this message]
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=20190403140743.GG8633@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=davem@davemloft.net \
--cc=groeck@chromium.org \
--cc=johan.hedberg@gmail.com \
--cc=marcel@holtmann.org \
--cc=mhjungk@gmail.com \
--cc=stable@vger.kernel.org \
--cc=zsm@chromium.org \
/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.