diff options
author | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2021-07-13 15:52:51 -0400 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2021-07-13 15:52:51 -0400 |
commit | 611ac726f9ebbb12f2113e5345ef109660954eeb (patch) | |
tree | 522735cbdec83a33ec29723b4ddc347118fdae21 /net/bluetooth/cmtp/core.c | |
parent | 5d4ed4f8b5efd347d761ee98c3a6e4e42e23f67e (diff) | |
parent | e73f0f0ee7541171d89f2e2491130c7771ba58d3 (diff) | |
download | linux-611ac726f9ebbb12f2113e5345ef109660954eeb.tar.gz |
Merge drm/drm-next into drm-intel-gt-next
Catching up with 5.14-rc1 and also preparing for a
needed common topic branch for the "Minor revid/stepping
and workaround cleanup"
Reference: https://patchwork.freedesktop.org/series/92299/
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'net/bluetooth/cmtp/core.c')
-rw-r--r-- | net/bluetooth/cmtp/core.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/bluetooth/cmtp/core.c b/net/bluetooth/cmtp/core.c index 07cfa3249f83..0a2d78e811cf 100644 --- a/net/bluetooth/cmtp/core.c +++ b/net/bluetooth/cmtp/core.c @@ -392,6 +392,11 @@ int cmtp_add_connection(struct cmtp_connadd_req *req, struct socket *sock) if (!(session->flags & BIT(CMTP_LOOPBACK))) { err = cmtp_attach_device(session); if (err < 0) { + /* Caller will call fput in case of failure, and so + * will cmtp_session kthread. + */ + get_file(session->sock->file); + atomic_inc(&session->terminate); wake_up_interruptible(sk_sleep(session->sock->sk)); up_write(&cmtp_session_sem); |