diff options
| author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2023-05-31 15:31:56 -0300 | 
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2023-05-31 15:31:56 -0300 | 
| commit | d17ed982e4497070e4575ecd8c5afcfcb7210b8b (patch) | |
| tree | 1524dbccee3c535ab3a8d027a170fe86a7c2935c /net/devlink/core.c | |
| parent | 422db30713ac84080a8c4b3efa9dd560b654ed57 (diff) | |
| parent | c041d33bf7ec731bb71f47e4d45a7aec9e40b1b9 (diff) | |
Merge tag 'perf-tools-fixes-for-v6.4-2-2023-05-30' into perf-tools-next
perf tools fixes for v6.4: 2nd batch
- Fix BPF CO-RE naming convention for checking the availability of fields on
  'union perf_mem_data_src' on the running kernel.
- Remove the use of llvm-strip on BPF skel object files, not needed, fixes a
  build breakage when the llvm package, that contains it in most distros, isn't
  installed.
- Fix tools that use both evsel->{bpf_counter_list,bpf_filters}, removing them from a
  union.
- Remove extra "--" from the 'perf ftrace latency' --use-nsec option,
  previously it was working only when using the '-n' alternative.
- Don't stop building when both binutils-devel and a C++ compiler isn't
  available to compile the alternative C++ demangle support code, disable that
  feature instead.
- Sync the linux/in.h and coresight-pmu.h header copies with the kernel sources.
- Fix relative include path to cs-etm.h.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'net/devlink/core.c')
| -rw-r--r-- | net/devlink/core.c | 16 | 
1 files changed, 7 insertions, 9 deletions
diff --git a/net/devlink/core.c b/net/devlink/core.c index 777b091ef74d..c23ebabadc52 100644 --- a/net/devlink/core.c +++ b/net/devlink/core.c @@ -204,11 +204,6 @@ struct devlink *devlink_alloc_ns(const struct devlink_ops *ops,  	if (ret < 0)  		goto err_xa_alloc; -	devlink->netdevice_nb.notifier_call = devlink_port_netdevice_event; -	ret = register_netdevice_notifier(&devlink->netdevice_nb); -	if (ret) -		goto err_register_netdevice_notifier; -  	devlink->dev = dev;  	devlink->ops = ops;  	xa_init_flags(&devlink->ports, XA_FLAGS_ALLOC); @@ -233,8 +228,6 @@ struct devlink *devlink_alloc_ns(const struct devlink_ops *ops,  	return devlink; -err_register_netdevice_notifier: -	xa_erase(&devlinks, devlink->index);  err_xa_alloc:  	kfree(devlink);  	return NULL; @@ -266,8 +259,6 @@ void devlink_free(struct devlink *devlink)  	xa_destroy(&devlink->params);  	xa_destroy(&devlink->ports); -	WARN_ON_ONCE(unregister_netdevice_notifier(&devlink->netdevice_nb)); -  	xa_erase(&devlinks, devlink->index);  	devlink_put(devlink); @@ -303,6 +294,10 @@ static struct pernet_operations devlink_pernet_ops __net_initdata = {  	.pre_exit = devlink_pernet_pre_exit,  }; +static struct notifier_block devlink_port_netdevice_nb = { +	.notifier_call = devlink_port_netdevice_event, +}; +  static int __init devlink_init(void)  {  	int err; @@ -311,6 +306,9 @@ static int __init devlink_init(void)  	if (err)  		goto out;  	err = register_pernet_subsys(&devlink_pernet_ops); +	if (err) +		goto out; +	err = register_netdevice_notifier(&devlink_port_netdevice_nb);  out:  	WARN_ON(err);  | 
