@@ -3344,7 +3344,7 @@ static const struct seq_operations unix_seq_ops = {
3344
3344
.show = unix_seq_show ,
3345
3345
};
3346
3346
3347
- #if IS_BUILTIN ( CONFIG_UNIX ) && defined( CONFIG_BPF_SYSCALL )
3347
+ #ifdef CONFIG_BPF_SYSCALL
3348
3348
struct bpf_unix_iter_state {
3349
3349
struct seq_net_private p ;
3350
3350
unsigned int cur_sk ;
@@ -3606,7 +3606,7 @@ static struct pernet_operations unix_net_ops = {
3606
3606
.exit = unix_net_exit ,
3607
3607
};
3608
3608
3609
- #if IS_BUILTIN ( CONFIG_UNIX ) && defined(CONFIG_BPF_SYSCALL ) && defined(CONFIG_PROC_FS )
3609
+ #if defined(CONFIG_BPF_SYSCALL ) && defined(CONFIG_PROC_FS )
3610
3610
DEFINE_BPF_ITER_FUNC (unix , struct bpf_iter_meta * meta ,
3611
3611
struct unix_sock * unix_sk , uid_t uid )
3612
3612
@@ -3706,28 +3706,13 @@ static int __init af_unix_init(void)
3706
3706
register_pernet_subsys (& unix_net_ops );
3707
3707
unix_bpf_build_proto ();
3708
3708
3709
- #if IS_BUILTIN ( CONFIG_UNIX ) && defined(CONFIG_BPF_SYSCALL ) && defined(CONFIG_PROC_FS )
3709
+ #if defined(CONFIG_BPF_SYSCALL ) && defined(CONFIG_PROC_FS )
3710
3710
bpf_iter_register ();
3711
3711
#endif
3712
3712
3713
3713
out :
3714
3714
return rc ;
3715
3715
}
3716
3716
3717
- static void __exit af_unix_exit (void )
3718
- {
3719
- sock_unregister (PF_UNIX );
3720
- proto_unregister (& unix_dgram_proto );
3721
- proto_unregister (& unix_stream_proto );
3722
- unregister_pernet_subsys (& unix_net_ops );
3723
- }
3724
-
3725
- /* Earlier than device_initcall() so that other drivers invoking
3726
- request_module() don't end up in a loop when modprobe tries
3727
- to use a UNIX socket. But later than subsys_initcall() because
3728
- we depend on stuff initialised there */
3717
+ /* Later than subsys_initcall() because we depend on stuff initialised there */
3729
3718
fs_initcall (af_unix_init );
3730
- module_exit (af_unix_exit );
3731
-
3732
- MODULE_LICENSE ("GPL" );
3733
- MODULE_ALIAS_NETPROTO (PF_UNIX );
0 commit comments