Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
northd: Don't detach op->list when it wasn't used.
In some scenarios, op->list is not attached anywhere, which makes attempts to detach it trigger ubsan failure. ovn/ovs/include/openvswitch/list.h:252:17: runtime error: member access within null pointer of type 'struct ovs_list' #0 0x?? in ovs_list_remove ovn/ovs/include/openvswitch/list.h:252:17 #1 0x?? in ovn_port_allocate_key ovn/northd/northd.c:4021:13 #2 0x?? in ls_port_init ovn/northd/northd.c:4321:10 ovn-org#3 0x?? in ls_port_create ovn/northd/northd.c:4342:10 ovn-org#4 0x?? in ls_handle_lsp_changes ovn/northd/northd.c:4511:18 ovn-org#5 0x?? in northd_handle_ls_changes ovn/northd/northd.c:4655:14 ovn-org#6 0x?? in northd_nb_logical_switch_handler ovn/northd/en-northd.c:150: This patch makes northd use op->list only as a temporary means for build_ports logic to track ports that are persisted in both, nb, or sb only. Now build_ports will always detach ops once done. Now that op->list is never left attached to a list, we can remove ovs_list_remove calls for it elsewhere, including where op was never attached in the first place. Signed-off-by: Ihar Hrachyshka <ihrachys@redhat.com> Signed-off-by: Numan Siddique <numans@ovn.org> Acked-by: Mark Michelson <mmichels@redhat.com>
- Loading branch information