summaryrefslogtreecommitdiff
path: root/kernel/debug
diff options
context:
space:
mode:
authorNiels Dossche <dossche.niels@gmail.com>2022-04-09 13:12:43 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-05-12 12:20:24 +0200
commit914c59ddab3db7bf9b67a66ff95db276ae558943 (patch)
treed44f5c93575a88bd3d8ba675e7f5a88c0c17a525 /kernel/debug
parent4faa185f35487cd11ccc95f8d6742adf77685dc2 (diff)
firewire: core: extend card->lock in fw_core_handle_bus_reset
commit a7ecbe92b9243edbe94772f6f2c854e4142a3345 upstream. card->local_node and card->bm_retries are both always accessed under card->lock. fw_core_handle_bus_reset has a check whose condition depends on card->local_node and whose body writes to card->bm_retries. Both of these accesses are not under card->lock. Move the lock acquiring of card->lock to before this check such that these accesses do happen when card->lock is held. fw_destroy_nodes is called inside the check. Since fw_destroy_nodes already acquires card->lock inside its function body, move this out to the callsites of fw_destroy_nodes. Also add a comment to indicate which locking is necessary when calling fw_destroy_nodes. Cc: <stable@vger.kernel.org> Signed-off-by: Niels Dossche <dossche.niels@gmail.com> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://lore.kernel.org/r/20220409041243.603210-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/debug')
0 files changed, 0 insertions, 0 deletions