diff options
author | Maciej S. Szmigiero <mail@maciej.szmigiero.name> | 2017-01-21 22:50:18 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-12 05:41:48 (GMT) |
commit | 1de86951101be4a3bcee9355a10f327bba491ec5 (patch) | |
tree | 7fe142119e492f125c6572ea09c16fe76dc8ebc1 /drivers/w1/masters | |
parent | 7afc0ee6ae73c23d8acc7a58113e269f6c1da2a2 (diff) | |
download | linux-1de86951101be4a3bcee9355a10f327bba491ec5.tar.xz |
w1: don't leak refcount on slave attach failure in w1_attach_slave_device()
commit d2ce4ea1a0b0162e5d2d7e7942ab6f5cc2063d5a upstream.
Near the beginning of w1_attach_slave_device() we increment a w1 master
reference count.
Later, when we are going to exit this function without actually attaching
a slave device (due to failure of __w1_attach_slave_device()) we need to
decrement this reference count back.
Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
Fixes: 9fcbbac5ded489 ("w1: process w1 netlink commands in w1_process thread")
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/w1/masters')
0 files changed, 0 insertions, 0 deletions