summaryrefslogtreecommitdiff
path: root/scripts/diffconfig
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2026-11-03 17:36:10 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-11-04 15:04:50 +0100
commitfa0858523f07f8dd71d89b221f4422c3b8096d90 (patch)
tree9211efcd87bbf3602b39bea2a1dc0e2d0408a046 /scripts/diffconfig
parent73383d06da9a1ded4c85845407cb4029aeecca39 (diff)
comedi: comedi_bond: Fix leak of opened device references
bonding_attach() calls do_dev_config() to open other comedi devices specified by the user and tries to make use of them as part of the 'bonding' device. If it successfully opens the other device but cannot use it (either because it does not any subdevices of a type the 'bonding' device can use, or because of some error that occurs while dealing with its subdevices) then it is left in the open state and the fact that it is open does not get recorded by the 'bonding' device, so the reference to the opened device gets lost. Fix it by closing the opened device if it could not be bound to the 'bonding' device. To match previous behavior, if the opened device is unsuitable then ignore it (after closing it). The opened devices recorded by the 'bonding' device will eventually get closed by bonding_detach() even if bonding_attach() returns an error. Fixes: 3cf840f65ad5 ("Staging: comedi: add comedi_bond driver") Cc: stable <stable@kernel.org> Reported-by: Wentao Liang <vulab@iscas.ac.cn> Link: https://lore.kernel.org/lkml/20261103063301.1025860-1-vulab@iscas.ac.cn Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Link: https://patch.msgid.link/20261103173610.89687-1-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/diffconfig')
0 files changed, 0 insertions, 0 deletions