]> git.itanic.dy.fi Git - linux-stable/commit
firewire: net: fix unexpected release of object for asynchronous request packet
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Wed, 10 May 2023 01:35:33 +0000 (10:35 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2023 12:02:03 +0000 (14:02 +0200)
commit2dbf73d3fabaea8736c70abef3aa7ca2bc37e8f4
tree95f215c8234b83569cb42126baea59e71687ca10
parentcb44ddee540e79ff1c5d66bef0890375cf193a66
firewire: net: fix unexpected release of object for asynchronous request packet

commit f7dcc5e33c1e4b0d278a30f7d2f0c9a63d7b40ca upstream.

The lifetime of object for asynchronous request packet is now maintained
by reference counting, while current implementation of firewire-net
releases the passed object in the handler.

This commit fixes the bug.

Reported-by: Dan Carpenter <error27@gmail.com>
Link: https://lore.kernel.org/lkml/Y%2Fymx6WZIAlrtjLc@workstation/
Fixes: 13a55d6bb15f ("firewire: core: use kref structure to maintain lifetime of data for fw_request structure")
Link: https://lore.kernel.org/lkml/20230510031205.782032-1-o-takashi@sakamocchi.jp/
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/firewire/net.c