Re: [PATCH v3 dwarves 0/6] Support for new btf_type_tag encoding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2023-05-25 at 03:13 +0300, Eduard Zingerman wrote:
[...]
> +static void test_delete()
> +{
> +	struct rb_node *next = rb_first(&test_tree);
> +
> +	while (next) {
> +		struct test_struct *pos = rb_entry(next, struct test_struct, rb_node);
> +		next = rb_next(&pos->rb_node);
> +		rb_erase(&pos->rb_node, &structures__tree);
                                        ^^^^^^^
                                        Should be &test_tree

I made a mistake in this test code.
When correct tree is passed to rb_erase() test passes w/o segfaults.
The original issue is caused by the same 'struct structures' instance
being added to an rb_tree twice, posted a separate patch with a fix to
the mailing list.

> +	}
> +}
[...]





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux