summaryrefslogtreecommitdiff
path: root/rust/kernel/types.rs
diff options
context:
space:
mode:
authorfarah kassabri <fkassabri@habana.ai>2023-01-10 12:29:55 +0200
committerOded Gabbay <ogabbay@kernel.org>2023-01-26 11:52:12 +0200
commitac5af9900f82b7034de7c9eb1d70d030ba325607 (patch)
tree03cde65aa4d7e4a21abcbfce6770e3bdd215e4d4 /rust/kernel/types.rs
parent1693fef9e95dbe8ab767d208a02328fff13fbb94 (diff)
habanalabs: fix bug in timestamps registration code
Protect re-using the same timestamp buffer record before actually adding it to the to interrupt wait list. Mark ts buff offset as in use in the spinlock protection area of the interrupt wait list to avoid getting in the re-use section in ts_buff_get_kernel_ts_record before adding the node to the list. this scenario might happen when multiple threads are racing on same offset and one thread could set data in the ts buff in ts_buff_get_kernel_ts_record then the other thread takes over and get to ts_buff_get_kernel_ts_record and we will try to re-use the same ts buff offset then we will try to delete a non existing node from the list. Signed-off-by: farah kassabri <fkassabri@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'rust/kernel/types.rs')
0 files changed, 0 insertions, 0 deletions