Kernel
  Threads by month 
                
            - ----- 2025 -----
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2024 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2023 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2022 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2021 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2020 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2019 -----
 - December
 
- 28 participants
 - 21059 discussions
 
16 Mar '24
                    
                        This patchset fixes the failure of af_alg05 cause by uninitialized
crypto ctx.
Herbert Xu (1):
  crypto: algif_aead - Only wake up when ctx->more is zero
Ondrej Mosnacek (1):
  crypto: algif_aead - fix uninitialized ctx->init
 crypto/af_alg.c         | 11 ++++++++---
 crypto/algif_aead.c     | 10 ++--------
 crypto/algif_skcipher.c | 11 +++--------
 include/crypto/if_alg.h |  4 +++-
 4 files changed, 16 insertions(+), 20 deletions(-)
-- 
2.34.1
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            2
                            
                          
                          
                            
    
                          
                        
                    
                    
                        hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I991OV
--------------------------------
In the process of load testing against panic, a deadlock issue
was discovered. The reason is that in the panic process,
console_unlock doesn't handle the printk_context variable
evenly, causing printk_context to overflow downwards, allowing
vprintk_func to enter the nmi direct branch without disabling
interrupt. Upon holding the logbuf_lock lock, an interrupt
running wake_up_klogd_work_func was called, resulting in a
deadlock.
To avoid this issue, move printk_safe_ext_irqrestore after
check abandon_console_lock_in_panic().
Fixes: 06a14c5f9e7d (printk: Drop console_sem during panic)
Signed-off-by: Ye Weihua <yeweihua4(a)huawei.com>
---
 kernel/printk/printk.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index f52eceb3c48a..c164761da3ec 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -2539,12 +2539,12 @@ void console_unlock(void)
 			return;
 		}
 
-		printk_safe_exit_irqrestore(flags);
-
 		/* Allow panic_cpu to take over the consoles safely */
 		if (abandon_console_lock_in_panic())
 			break;
 
+		printk_safe_exit_irqrestore(flags);
+
 		if (do_cond_resched)
 			cond_resched();
 	}
-- 
2.34.1
                    
                  
                  
                          
                            
                            2
                            
                          
                          
                            
                            1
                            
                          
                          
                            
    
                          
                        
                    
                        
                            
                                
                            
                            [openeuler:OLK-5.10 24784/30000] drivers/ub/urma/uburma/uburma_dev_ops.c:32:5: warning: no previous prototype for 'uburma_mmap'
                        
                        
by kernel test robot 16 Mar '24
                    by kernel test robot 16 Mar '24
16 Mar '24
                    
                        tree:   https://gitee.com/openeuler/kernel.git OLK-5.10
head:   32bb7b0a7c87769858fbb9d60574b830383c28f7
commit: 7d130c6018dbfd09c6e1c5d91b347fdbf3924321 [24784/30000] ub: add mmap ops support in ubcore and uburma
config: arm64-randconfig-003-20240312 (https://download.01.org/0day-ci/archive/20240316/202403161211.0W0M5B5E-lkp@…)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240316/202403161211.0W0M5B5E-lkp@…)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp(a)intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202403161211.0W0M5B5E-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/ub/urma/uburma/uburma_dev_ops.c:32:5: warning: no previous prototype for 'uburma_mmap' [-Wmissing-prototypes]
      32 | int uburma_mmap(struct file *filp, struct vm_area_struct *vma)
         |     ^~~~~~~~~~~
   drivers/ub/urma/uburma/uburma_dev_ops.c:64:6: warning: no previous prototype for 'uburma_release_file' [-Wmissing-prototypes]
      64 | void uburma_release_file(struct kref *ref)
         |      ^~~~~~~~~~~~~~~~~~~
   drivers/ub/urma/uburma/uburma_dev_ops.c:81:5: warning: no previous prototype for 'uburma_open' [-Wmissing-prototypes]
      81 | int uburma_open(struct inode *inode, struct file *filp)
         |     ^~~~~~~~~~~
   drivers/ub/urma/uburma/uburma_dev_ops.c: In function 'uburma_open':
   drivers/ub/urma/uburma/uburma_dev_ops.c:98:50: warning: the comparison will always evaluate as 'false' for the address of 'dev_name' will never be NULL [-Waddress]
      98 |         if (ubc_dev == NULL || ubc_dev->dev_name == NULL) {
         |                                                  ^~
   In file included from drivers/ub/urma/uburma/uburma_dev_ops.c:25:
   include/urma/ubcore_types.h:1589:14: note: 'dev_name' declared here
    1589 |         char dev_name[UBCORE_MAX_DEV_NAME];
         |              ^~~~~~~~
   drivers/ub/urma/uburma/uburma_dev_ops.c: At top level:
   drivers/ub/urma/uburma/uburma_dev_ops.c:134:5: warning: no previous prototype for 'uburma_close' [-Wmissing-prototypes]
     134 | int uburma_close(struct inode *inode, struct file *filp)
         |     ^~~~~~~~~~~~
vim +/uburma_mmap +32 drivers/ub/urma/uburma/uburma_dev_ops.c
    31	
  > 32	int uburma_mmap(struct file *filp, struct vm_area_struct *vma)
    33	{
    34		struct uburma_file *file = filp->private_data;
    35		struct uburma_device *ubu_dev;
    36		struct ubcore_device *ubc_dev;
    37		int srcu_idx;
    38		int ret;
    39	
    40		if (file == NULL || file->ucontext == NULL) {
    41			uburma_log_err("can not find ucontext.\n");
    42			return -EINVAL;
    43		}
    44	
    45		ubu_dev = file->ubu_dev;
    46		uburma_cmd_inc(ubu_dev);
    47	
    48		srcu_idx = srcu_read_lock(&ubu_dev->ubc_dev_srcu);
    49		ubc_dev = srcu_dereference(ubu_dev->ubc_dev, &ubu_dev->ubc_dev_srcu);
    50		if (ubc_dev == NULL || ubc_dev->ops == NULL || ubc_dev->ops->mmap == NULL) {
    51			uburma_log_err("can not find ubcore device.\n");
    52			ret = -ENODEV;
    53			goto out;
    54		}
    55	
    56		ret = ubc_dev->ops->mmap(file->ucontext, vma);
    57	
    58	out:
    59		srcu_read_unlock(&ubu_dev->ubc_dev_srcu, srcu_idx);
    60		uburma_cmd_dec(ubu_dev);
    61		return ret;
    62	}
    63	
-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            0
                            
                          
                          
                            
    
                          
                        
                    
                    
                        hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I991OV
--------------------------------
In the process of load testing against panic, a deadlock issue
was discovered. The reason is that in the panic process,
console_unlock doesn't handle the printk_context variable
evenly, causing printk_context to overflow downwards, allowing
vprintk_func to enter the nmi direct branch without disabling
interrupt. Upon holding the logbuf_lock lock, an interrupt
running wake_up_klogd_work_func was called, resulting in a
deadlock.
To avoid this issue, move printk_safe_ext_irqrestore after
check abandon_console_lock_in_panic().
Fixes: 7c2aff380e41 ([Backport] printk: Drop console_sem during panic)
Signed-off-by: Ye Weihua <yeweihua4(a)huawei.com>
---
 kernel/printk/printk.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 87cd50ae6cd6..ffd7f90b8f02 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -2609,12 +2609,12 @@ void console_unlock(void)
 			return;
 		}
 
-		printk_safe_exit_irqrestore(flags);
-
 		/* Allow panic_cpu to take over the consoles safely */
 		if (abandon_console_lock_in_panic())
 			break;
 
+		printk_safe_exit_irqrestore(flags);
+
 		if (do_cond_resched)
 			cond_resched();
 	}
-- 
2.34.1
                    
                  
                  
                          
                            
                            2
                            
                          
                          
                            
                            1
                            
                          
                          
                            
    
                          
                        
                    16 Mar '24
                    
                        From: Ondrej Mosnacek <omosnace(a)redhat.com>
mainline inclusion
from mainline-v5.9-rc1
commit 21dfbcd1f5cbff9cf2f9e7e43475aed8d072b0dd
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I991GQ
CVE: NA
Reference: https://github.com/torvalds/linux/commit/21dfbcd1f5cbff9cf2f9e7e43475aed8d0…
--------------------------------
In skcipher_accept_parent_nokey() the whole af_alg_ctx structure is
cleared by memset() after allocation, so add such memset() also to
aead_accept_parent_nokey() so that the new "init" field is also
initialized to zero. Without that the initial ctx->init checks might
randomly return true and cause errors.
While there, also remove the redundant zero assignments in both
functions.
Found via libkcapi testsuite.
Cc: Stephan Mueller <smueller(a)chronox.de>
Fixes: f3c802a1f300 ("crypto: algif_aead - Only wake up when ctx->more is zero")
Suggested-by: Herbert Xu <herbert(a)gondor.apana.org.au>
Signed-off-by: Ondrej Mosnacek <omosnace(a)redhat.com>
Signed-off-by: Herbert Xu <herbert(a)gondor.apana.org.au>
Signed-off-by: GUO Zihua <guozihua(a)huawei.com>
---
 crypto/algif_aead.c     | 6 ------
 crypto/algif_skcipher.c | 7 +------
 2 files changed, 1 insertion(+), 12 deletions(-)
diff --git a/crypto/algif_aead.c b/crypto/algif_aead.c
index c40a8c7ee8ae..3f20d3e4acfb 100644
--- a/crypto/algif_aead.c
+++ b/crypto/algif_aead.c
@@ -565,12 +565,6 @@ static int aead_accept_parent_nokey(void *private, struct sock *sk)
 
 	INIT_LIST_HEAD(&ctx->tsgl_list);
 	ctx->len = len;
-	ctx->used = 0;
-	atomic_set(&ctx->rcvused, 0);
-	ctx->more = 0;
-	ctx->merge = 0;
-	ctx->enc = 0;
-	ctx->aead_assoclen = 0;
 	crypto_init_wait(&ctx->wait);
 
 	ask->private = ctx;
diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c
index fe1f6b0f7c4c..94aeb8b946b0 100644
--- a/crypto/algif_skcipher.c
+++ b/crypto/algif_skcipher.c
@@ -344,6 +344,7 @@ static int skcipher_accept_parent_nokey(void *private, struct sock *sk)
 	ctx = sock_kmalloc(sk, len, GFP_KERNEL);
 	if (!ctx)
 		return -ENOMEM;
+	memset(ctx, 0, len);
 
 	ctx->iv = sock_kmalloc(sk, crypto_skcipher_ivsize(tfm),
 			       GFP_KERNEL);
@@ -351,16 +352,10 @@ static int skcipher_accept_parent_nokey(void *private, struct sock *sk)
 		sock_kfree_s(sk, ctx, len);
 		return -ENOMEM;
 	}
-
 	memset(ctx->iv, 0, crypto_skcipher_ivsize(tfm));
 
 	INIT_LIST_HEAD(&ctx->tsgl_list);
 	ctx->len = len;
-	ctx->used = 0;
-	atomic_set(&ctx->rcvused, 0);
-	ctx->more = 0;
-	ctx->merge = 0;
-	ctx->enc = 0;
 	crypto_init_wait(&ctx->wait);
 
 	ask->private = ctx;
-- 
2.34.1
                    
                  
                  
                          
                            
                            2
                            
                          
                          
                            
                            1
                            
                          
                          
                            
    
                          
                        
                    
                    
                        From: Eric Dumazet <edumazet(a)google.com>
stable inclusion
from stable-v4.19.307
commit 6b950c712a9a05cdda4aea7fcb2848766576c11b
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I96GXM
CVE: CVE-2024-26625
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id…
---------------------------
[ Upstream commit aa2b2eb3934859904c287bf5434647ba72e14c1c ]
syzbot reported an interesting trace [1] caused by a stale sk->sk_wq
pointer in a closed llc socket.
In commit ff7b11aa481f ("net: socket: set sock->sk to NULL after
calling proto_ops::release()") Eric Biggers hinted that some protocols
are missing a sock_orphan(), we need to perform a full audit.
In net-next, I plan to clear sock->sk from sock_orphan() and
amend Eric patch to add a warning.
[1]
 BUG: KASAN: slab-use-after-free in list_empty include/linux/list.h:373 [inline]
 BUG: KASAN: slab-use-after-free in waitqueue_active include/linux/wait.h:127 [inline]
 BUG: KASAN: slab-use-after-free in sock_def_write_space_wfree net/core/sock.c:3384 [inline]
 BUG: KASAN: slab-use-after-free in sock_wfree+0x9a8/0x9d0 net/core/sock.c:2468
Read of size 8 at addr ffff88802f4fc880 by task ksoftirqd/1/27
CPU: 1 PID: 27 Comm: ksoftirqd/1 Not tainted 6.8.0-rc1-syzkaller-00049-g6098d87eaf31 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Call Trace:
 <TASK>
  __dump_stack lib/dump_stack.c:88 [inline]
  dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106
  print_address_description mm/kasan/report.c:377 [inline]
  print_report+0xc4/0x620 mm/kasan/report.c:488
  kasan_report+0xda/0x110 mm/kasan/report.c:601
  list_empty include/linux/list.h:373 [inline]
  waitqueue_active include/linux/wait.h:127 [inline]
  sock_def_write_space_wfree net/core/sock.c:3384 [inline]
  sock_wfree+0x9a8/0x9d0 net/core/sock.c:2468
  skb_release_head_state+0xa3/0x2b0 net/core/skbuff.c:1080
  skb_release_all net/core/skbuff.c:1092 [inline]
  napi_consume_skb+0x119/0x2b0 net/core/skbuff.c:1404
  e1000_unmap_and_free_tx_resource+0x144/0x200 drivers/net/ethernet/intel/e1000/e1000_main.c:1970
  e1000_clean_tx_irq drivers/net/ethernet/intel/e1000/e1000_main.c:3860 [inline]
  e1000_clean+0x4a1/0x26e0 drivers/net/ethernet/intel/e1000/e1000_main.c:3801
  __napi_poll.constprop.0+0xb4/0x540 net/core/dev.c:6576
  napi_poll net/core/dev.c:6645 [inline]
  net_rx_action+0x956/0xe90 net/core/dev.c:6778
  __do_softirq+0x21a/0x8de kernel/softirq.c:553
  run_ksoftirqd kernel/softirq.c:921 [inline]
  run_ksoftirqd+0x31/0x60 kernel/softirq.c:913
  smpboot_thread_fn+0x660/0xa10 kernel/smpboot.c:164
  kthread+0x2c6/0x3a0 kernel/kthread.c:388
  ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
  ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242
 </TASK>
Allocated by task 5167:
  kasan_save_stack+0x33/0x50 mm/kasan/common.c:47
  kasan_save_track+0x14/0x30 mm/kasan/common.c:68
  unpoison_slab_object mm/kasan/common.c:314 [inline]
  __kasan_slab_alloc+0x81/0x90 mm/kasan/common.c:340
  kasan_slab_alloc include/linux/kasan.h:201 [inline]
  slab_post_alloc_hook mm/slub.c:3813 [inline]
  slab_alloc_node mm/slub.c:3860 [inline]
  kmem_cache_alloc_lru+0x142/0x6f0 mm/slub.c:3879
  alloc_inode_sb include/linux/fs.h:3019 [inline]
  sock_alloc_inode+0x25/0x1c0 net/socket.c:308
  alloc_inode+0x5d/0x220 fs/inode.c:260
  new_inode_pseudo+0x16/0x80 fs/inode.c:1005
  sock_alloc+0x40/0x270 net/socket.c:634
  __sock_create+0xbc/0x800 net/socket.c:1535
  sock_create net/socket.c:1622 [inline]
  __sys_socket_create net/socket.c:1659 [inline]
  __sys_socket+0x14c/0x260 net/socket.c:1706
  __do_sys_socket net/socket.c:1720 [inline]
  __se_sys_socket net/socket.c:1718 [inline]
  __x64_sys_socket+0x72/0xb0 net/socket.c:1718
  do_syscall_x64 arch/x86/entry/common.c:52 [inline]
  do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
Freed by task 0:
  kasan_save_stack+0x33/0x50 mm/kasan/common.c:47
  kasan_save_track+0x14/0x30 mm/kasan/common.c:68
  kasan_save_free_info+0x3f/0x60 mm/kasan/generic.c:640
  poison_slab_object mm/kasan/common.c:241 [inline]
  __kasan_slab_free+0x121/0x1b0 mm/kasan/common.c:257
  kasan_slab_free include/linux/kasan.h:184 [inline]
  slab_free_hook mm/slub.c:2121 [inline]
  slab_free mm/slub.c:4299 [inline]
  kmem_cache_free+0x129/0x350 mm/slub.c:4363
  i_callback+0x43/0x70 fs/inode.c:249
  rcu_do_batch kernel/rcu/tree.c:2158 [inline]
  rcu_core+0x819/0x1680 kernel/rcu/tree.c:2433
  __do_softirq+0x21a/0x8de kernel/softirq.c:553
Last potentially related work creation:
  kasan_save_stack+0x33/0x50 mm/kasan/common.c:47
  __kasan_record_aux_stack+0xba/0x100 mm/kasan/generic.c:586
  __call_rcu_common.constprop.0+0x9a/0x7b0 kernel/rcu/tree.c:2683
  destroy_inode+0x129/0x1b0 fs/inode.c:315
  iput_final fs/inode.c:1739 [inline]
  iput.part.0+0x560/0x7b0 fs/inode.c:1765
  iput+0x5c/0x80 fs/inode.c:1755
  dentry_unlink_inode+0x292/0x430 fs/dcache.c:400
  __dentry_kill+0x1ca/0x5f0 fs/dcache.c:603
  dput.part.0+0x4ac/0x9a0 fs/dcache.c:845
  dput+0x1f/0x30 fs/dcache.c:835
  __fput+0x3b9/0xb70 fs/file_table.c:384
  task_work_run+0x14d/0x240 kernel/task_work.c:180
  exit_task_work include/linux/task_work.h:38 [inline]
  do_exit+0xa8a/0x2ad0 kernel/exit.c:871
  do_group_exit+0xd4/0x2a0 kernel/exit.c:1020
  __do_sys_exit_group kernel/exit.c:1031 [inline]
  __se_sys_exit_group kernel/exit.c:1029 [inline]
  __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1029
  do_syscall_x64 arch/x86/entry/common.c:52 [inline]
  do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
The buggy address belongs to the object at ffff88802f4fc800
 which belongs to the cache sock_inode_cache of size 1408
The buggy address is located 128 bytes inside of
 freed 1408-byte region [ffff88802f4fc800, ffff88802f4fcd80)
The buggy address belongs to the physical page:
page:ffffea0000bd3e00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2f4f8
head:ffffea0000bd3e00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
anon flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888013b06b40 0000000000000000 0000000000000001
raw: 0000000000000000 0000000080150015 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Reclaimable, gfp_mask 0xd20d0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_RECLAIMABLE), pid 4956, tgid 4956 (sshd), ts 31423924727, free_ts 0
  set_page_owner include/linux/page_owner.h:31 [inline]
  post_alloc_hook+0x2d0/0x350 mm/page_alloc.c:1533
  prep_new_page mm/page_alloc.c:1540 [inline]
  get_page_from_freelist+0xa28/0x3780 mm/page_alloc.c:3311
  __alloc_pages+0x22f/0x2440 mm/page_alloc.c:4567
  __alloc_pages_node include/linux/gfp.h:238 [inline]
  alloc_pages_node include/linux/gfp.h:261 [inline]
  alloc_slab_page mm/slub.c:2190 [inline]
  allocate_slab mm/slub.c:2354 [inline]
  new_slab+0xcc/0x3a0 mm/slub.c:2407
  ___slab_alloc+0x4af/0x19a0 mm/slub.c:3540
  __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3625
  __slab_alloc_node mm/slub.c:3678 [inline]
  slab_alloc_node mm/slub.c:3850 [inline]
  kmem_cache_alloc_lru+0x379/0x6f0 mm/slub.c:3879
  alloc_inode_sb include/linux/fs.h:3019 [inline]
  sock_alloc_inode+0x25/0x1c0 net/socket.c:308
  alloc_inode+0x5d/0x220 fs/inode.c:260
  new_inode_pseudo+0x16/0x80 fs/inode.c:1005
  sock_alloc+0x40/0x270 net/socket.c:634
  __sock_create+0xbc/0x800 net/socket.c:1535
  sock_create net/socket.c:1622 [inline]
  __sys_socket_create net/socket.c:1659 [inline]
  __sys_socket+0x14c/0x260 net/socket.c:1706
  __do_sys_socket net/socket.c:1720 [inline]
  __se_sys_socket net/socket.c:1718 [inline]
  __x64_sys_socket+0x72/0xb0 net/socket.c:1718
  do_syscall_x64 arch/x86/entry/common.c:52 [inline]
  do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
page_owner free stack trace missing
Memory state around the buggy address:
 ffff88802f4fc780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88802f4fc800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88802f4fc880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                   ^
 ffff88802f4fc900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88802f4fc980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
Fixes: 43815482370c ("net: sock_def_readable() and friends RCU conversion")
Reported-and-tested-by: syzbot+32b89eaa102b372ff76d(a)syzkaller.appspotmail.com
Signed-off-by: Eric Dumazet <edumazet(a)google.com>
Cc: Eric Biggers <ebiggers(a)google.com>
Cc: Kuniyuki Iwashima <kuniyu(a)amazon.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu(a)amazon.com>
Link: https://lore.kernel.org/r/20240126165532.3396702-1-edumazet@google.com
Signed-off-by: Paolo Abeni <pabeni(a)redhat.com>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
Signed-off-by: Liu Jian <liujian56(a)huawei.com>
---
 net/llc/af_llc.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c
index d23cd51efc5f..91ee9928d56f 100644
--- a/net/llc/af_llc.c
+++ b/net/llc/af_llc.c
@@ -219,6 +219,8 @@ static int llc_ui_release(struct socket *sock)
 	if (llc->dev)
 		dev_put(llc->dev);
 	sock_put(sk);
+	sock_orphan(sk);
+	sock->sk = NULL;
 	llc_sk_free(sk);
 out:
 	return 0;
-- 
2.34.1
                    
                  
                  
                          
                            
                            2
                            
                          
                          
                            
                            1
                            
                          
                          
                            
    
                          
                        
                    
                    
                        From: Eric Dumazet <edumazet(a)google.com>
stable inclusion
from stable-v5.10.210
commit d0b5b1f12429df3cd9751ab8b2f53729b77733b7
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I96GXM
CVE: CVE-2024-26625
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id…
---------------------------
[ Upstream commit aa2b2eb3934859904c287bf5434647ba72e14c1c ]
syzbot reported an interesting trace [1] caused by a stale sk->sk_wq
pointer in a closed llc socket.
In commit ff7b11aa481f ("net: socket: set sock->sk to NULL after
calling proto_ops::release()") Eric Biggers hinted that some protocols
are missing a sock_orphan(), we need to perform a full audit.
In net-next, I plan to clear sock->sk from sock_orphan() and
amend Eric patch to add a warning.
[1]
 BUG: KASAN: slab-use-after-free in list_empty include/linux/list.h:373 [inline]
 BUG: KASAN: slab-use-after-free in waitqueue_active include/linux/wait.h:127 [inline]
 BUG: KASAN: slab-use-after-free in sock_def_write_space_wfree net/core/sock.c:3384 [inline]
 BUG: KASAN: slab-use-after-free in sock_wfree+0x9a8/0x9d0 net/core/sock.c:2468
Read of size 8 at addr ffff88802f4fc880 by task ksoftirqd/1/27
CPU: 1 PID: 27 Comm: ksoftirqd/1 Not tainted 6.8.0-rc1-syzkaller-00049-g6098d87eaf31 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Call Trace:
 <TASK>
  __dump_stack lib/dump_stack.c:88 [inline]
  dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106
  print_address_description mm/kasan/report.c:377 [inline]
  print_report+0xc4/0x620 mm/kasan/report.c:488
  kasan_report+0xda/0x110 mm/kasan/report.c:601
  list_empty include/linux/list.h:373 [inline]
  waitqueue_active include/linux/wait.h:127 [inline]
  sock_def_write_space_wfree net/core/sock.c:3384 [inline]
  sock_wfree+0x9a8/0x9d0 net/core/sock.c:2468
  skb_release_head_state+0xa3/0x2b0 net/core/skbuff.c:1080
  skb_release_all net/core/skbuff.c:1092 [inline]
  napi_consume_skb+0x119/0x2b0 net/core/skbuff.c:1404
  e1000_unmap_and_free_tx_resource+0x144/0x200 drivers/net/ethernet/intel/e1000/e1000_main.c:1970
  e1000_clean_tx_irq drivers/net/ethernet/intel/e1000/e1000_main.c:3860 [inline]
  e1000_clean+0x4a1/0x26e0 drivers/net/ethernet/intel/e1000/e1000_main.c:3801
  __napi_poll.constprop.0+0xb4/0x540 net/core/dev.c:6576
  napi_poll net/core/dev.c:6645 [inline]
  net_rx_action+0x956/0xe90 net/core/dev.c:6778
  __do_softirq+0x21a/0x8de kernel/softirq.c:553
  run_ksoftirqd kernel/softirq.c:921 [inline]
  run_ksoftirqd+0x31/0x60 kernel/softirq.c:913
  smpboot_thread_fn+0x660/0xa10 kernel/smpboot.c:164
  kthread+0x2c6/0x3a0 kernel/kthread.c:388
  ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
  ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242
 </TASK>
Allocated by task 5167:
  kasan_save_stack+0x33/0x50 mm/kasan/common.c:47
  kasan_save_track+0x14/0x30 mm/kasan/common.c:68
  unpoison_slab_object mm/kasan/common.c:314 [inline]
  __kasan_slab_alloc+0x81/0x90 mm/kasan/common.c:340
  kasan_slab_alloc include/linux/kasan.h:201 [inline]
  slab_post_alloc_hook mm/slub.c:3813 [inline]
  slab_alloc_node mm/slub.c:3860 [inline]
  kmem_cache_alloc_lru+0x142/0x6f0 mm/slub.c:3879
  alloc_inode_sb include/linux/fs.h:3019 [inline]
  sock_alloc_inode+0x25/0x1c0 net/socket.c:308
  alloc_inode+0x5d/0x220 fs/inode.c:260
  new_inode_pseudo+0x16/0x80 fs/inode.c:1005
  sock_alloc+0x40/0x270 net/socket.c:634
  __sock_create+0xbc/0x800 net/socket.c:1535
  sock_create net/socket.c:1622 [inline]
  __sys_socket_create net/socket.c:1659 [inline]
  __sys_socket+0x14c/0x260 net/socket.c:1706
  __do_sys_socket net/socket.c:1720 [inline]
  __se_sys_socket net/socket.c:1718 [inline]
  __x64_sys_socket+0x72/0xb0 net/socket.c:1718
  do_syscall_x64 arch/x86/entry/common.c:52 [inline]
  do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
Freed by task 0:
  kasan_save_stack+0x33/0x50 mm/kasan/common.c:47
  kasan_save_track+0x14/0x30 mm/kasan/common.c:68
  kasan_save_free_info+0x3f/0x60 mm/kasan/generic.c:640
  poison_slab_object mm/kasan/common.c:241 [inline]
  __kasan_slab_free+0x121/0x1b0 mm/kasan/common.c:257
  kasan_slab_free include/linux/kasan.h:184 [inline]
  slab_free_hook mm/slub.c:2121 [inline]
  slab_free mm/slub.c:4299 [inline]
  kmem_cache_free+0x129/0x350 mm/slub.c:4363
  i_callback+0x43/0x70 fs/inode.c:249
  rcu_do_batch kernel/rcu/tree.c:2158 [inline]
  rcu_core+0x819/0x1680 kernel/rcu/tree.c:2433
  __do_softirq+0x21a/0x8de kernel/softirq.c:553
Last potentially related work creation:
  kasan_save_stack+0x33/0x50 mm/kasan/common.c:47
  __kasan_record_aux_stack+0xba/0x100 mm/kasan/generic.c:586
  __call_rcu_common.constprop.0+0x9a/0x7b0 kernel/rcu/tree.c:2683
  destroy_inode+0x129/0x1b0 fs/inode.c:315
  iput_final fs/inode.c:1739 [inline]
  iput.part.0+0x560/0x7b0 fs/inode.c:1765
  iput+0x5c/0x80 fs/inode.c:1755
  dentry_unlink_inode+0x292/0x430 fs/dcache.c:400
  __dentry_kill+0x1ca/0x5f0 fs/dcache.c:603
  dput.part.0+0x4ac/0x9a0 fs/dcache.c:845
  dput+0x1f/0x30 fs/dcache.c:835
  __fput+0x3b9/0xb70 fs/file_table.c:384
  task_work_run+0x14d/0x240 kernel/task_work.c:180
  exit_task_work include/linux/task_work.h:38 [inline]
  do_exit+0xa8a/0x2ad0 kernel/exit.c:871
  do_group_exit+0xd4/0x2a0 kernel/exit.c:1020
  __do_sys_exit_group kernel/exit.c:1031 [inline]
  __se_sys_exit_group kernel/exit.c:1029 [inline]
  __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1029
  do_syscall_x64 arch/x86/entry/common.c:52 [inline]
  do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
The buggy address belongs to the object at ffff88802f4fc800
 which belongs to the cache sock_inode_cache of size 1408
The buggy address is located 128 bytes inside of
 freed 1408-byte region [ffff88802f4fc800, ffff88802f4fcd80)
The buggy address belongs to the physical page:
page:ffffea0000bd3e00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2f4f8
head:ffffea0000bd3e00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
anon flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888013b06b40 0000000000000000 0000000000000001
raw: 0000000000000000 0000000080150015 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Reclaimable, gfp_mask 0xd20d0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_RECLAIMABLE), pid 4956, tgid 4956 (sshd), ts 31423924727, free_ts 0
  set_page_owner include/linux/page_owner.h:31 [inline]
  post_alloc_hook+0x2d0/0x350 mm/page_alloc.c:1533
  prep_new_page mm/page_alloc.c:1540 [inline]
  get_page_from_freelist+0xa28/0x3780 mm/page_alloc.c:3311
  __alloc_pages+0x22f/0x2440 mm/page_alloc.c:4567
  __alloc_pages_node include/linux/gfp.h:238 [inline]
  alloc_pages_node include/linux/gfp.h:261 [inline]
  alloc_slab_page mm/slub.c:2190 [inline]
  allocate_slab mm/slub.c:2354 [inline]
  new_slab+0xcc/0x3a0 mm/slub.c:2407
  ___slab_alloc+0x4af/0x19a0 mm/slub.c:3540
  __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3625
  __slab_alloc_node mm/slub.c:3678 [inline]
  slab_alloc_node mm/slub.c:3850 [inline]
  kmem_cache_alloc_lru+0x379/0x6f0 mm/slub.c:3879
  alloc_inode_sb include/linux/fs.h:3019 [inline]
  sock_alloc_inode+0x25/0x1c0 net/socket.c:308
  alloc_inode+0x5d/0x220 fs/inode.c:260
  new_inode_pseudo+0x16/0x80 fs/inode.c:1005
  sock_alloc+0x40/0x270 net/socket.c:634
  __sock_create+0xbc/0x800 net/socket.c:1535
  sock_create net/socket.c:1622 [inline]
  __sys_socket_create net/socket.c:1659 [inline]
  __sys_socket+0x14c/0x260 net/socket.c:1706
  __do_sys_socket net/socket.c:1720 [inline]
  __se_sys_socket net/socket.c:1718 [inline]
  __x64_sys_socket+0x72/0xb0 net/socket.c:1718
  do_syscall_x64 arch/x86/entry/common.c:52 [inline]
  do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
page_owner free stack trace missing
Memory state around the buggy address:
 ffff88802f4fc780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88802f4fc800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88802f4fc880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                   ^
 ffff88802f4fc900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88802f4fc980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
Fixes: 43815482370c ("net: sock_def_readable() and friends RCU conversion")
Reported-and-tested-by: syzbot+32b89eaa102b372ff76d(a)syzkaller.appspotmail.com
Signed-off-by: Eric Dumazet <edumazet(a)google.com>
Cc: Eric Biggers <ebiggers(a)google.com>
Cc: Kuniyuki Iwashima <kuniyu(a)amazon.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu(a)amazon.com>
Link: https://lore.kernel.org/r/20240126165532.3396702-1-edumazet@google.com
Signed-off-by: Paolo Abeni <pabeni(a)redhat.com>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
Signed-off-by: Liu Jian <liujian56(a)huawei.com>
---
 net/llc/af_llc.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c
index 01e26698285a..90a32864401c 100644
--- a/net/llc/af_llc.c
+++ b/net/llc/af_llc.c
@@ -227,6 +227,8 @@ static int llc_ui_release(struct socket *sock)
 	if (llc->dev)
 		dev_put(llc->dev);
 	sock_put(sk);
+	sock_orphan(sk);
+	sock->sk = NULL;
 	llc_sk_free(sk);
 out:
 	return 0;
-- 
2.34.1
                    
                  
                  
                          
                            
                            2
                            
                          
                          
                            
                            1
                            
                          
                          
                            
    
                          
                        
                    
                    
                        From: Eric Dumazet <edumazet(a)google.com>
mainline inclusion
from mainline-v6.8-rc3
commit aa2b2eb3934859904c287bf5434647ba72e14c1c
category: S419
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I96GXM
CVE: CVE-2024-26625
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?…
---------------------------
[ Upstream commit aa2b2eb3934859904c287bf5434647ba72e14c1c ]
syzbot reported an interesting trace [1] caused by a stale sk->sk_wq
pointer in a closed llc socket.
In commit ff7b11aa481f ("net: socket: set sock->sk to NULL after
calling proto_ops::release()") Eric Biggers hinted that some protocols
are missing a sock_orphan(), we need to perform a full audit.
In net-next, I plan to clear sock->sk from sock_orphan() and
amend Eric patch to add a warning.
[1]
 BUG: KASAN: slab-use-after-free in list_empty include/linux/list.h:373 [inline]
 BUG: KASAN: slab-use-after-free in waitqueue_active include/linux/wait.h:127 [inline]
 BUG: KASAN: slab-use-after-free in sock_def_write_space_wfree net/core/sock.c:3384 [inline]
 BUG: KASAN: slab-use-after-free in sock_wfree+0x9a8/0x9d0 net/core/sock.c:2468
Read of size 8 at addr ffff88802f4fc880 by task ksoftirqd/1/27
CPU: 1 PID: 27 Comm: ksoftirqd/1 Not tainted 6.8.0-rc1-syzkaller-00049-g6098d87eaf31 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Call Trace:
 <TASK>
  __dump_stack lib/dump_stack.c:88 [inline]
  dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106
  print_address_description mm/kasan/report.c:377 [inline]
  print_report+0xc4/0x620 mm/kasan/report.c:488
  kasan_report+0xda/0x110 mm/kasan/report.c:601
  list_empty include/linux/list.h:373 [inline]
  waitqueue_active include/linux/wait.h:127 [inline]
  sock_def_write_space_wfree net/core/sock.c:3384 [inline]
  sock_wfree+0x9a8/0x9d0 net/core/sock.c:2468
  skb_release_head_state+0xa3/0x2b0 net/core/skbuff.c:1080
  skb_release_all net/core/skbuff.c:1092 [inline]
  napi_consume_skb+0x119/0x2b0 net/core/skbuff.c:1404
  e1000_unmap_and_free_tx_resource+0x144/0x200 drivers/net/ethernet/intel/e1000/e1000_main.c:1970
  e1000_clean_tx_irq drivers/net/ethernet/intel/e1000/e1000_main.c:3860 [inline]
  e1000_clean+0x4a1/0x26e0 drivers/net/ethernet/intel/e1000/e1000_main.c:3801
  __napi_poll.constprop.0+0xb4/0x540 net/core/dev.c:6576
  napi_poll net/core/dev.c:6645 [inline]
  net_rx_action+0x956/0xe90 net/core/dev.c:6778
  __do_softirq+0x21a/0x8de kernel/softirq.c:553
  run_ksoftirqd kernel/softirq.c:921 [inline]
  run_ksoftirqd+0x31/0x60 kernel/softirq.c:913
  smpboot_thread_fn+0x660/0xa10 kernel/smpboot.c:164
  kthread+0x2c6/0x3a0 kernel/kthread.c:388
  ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
  ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242
 </TASK>
Allocated by task 5167:
  kasan_save_stack+0x33/0x50 mm/kasan/common.c:47
  kasan_save_track+0x14/0x30 mm/kasan/common.c:68
  unpoison_slab_object mm/kasan/common.c:314 [inline]
  __kasan_slab_alloc+0x81/0x90 mm/kasan/common.c:340
  kasan_slab_alloc include/linux/kasan.h:201 [inline]
  slab_post_alloc_hook mm/slub.c:3813 [inline]
  slab_alloc_node mm/slub.c:3860 [inline]
  kmem_cache_alloc_lru+0x142/0x6f0 mm/slub.c:3879
  alloc_inode_sb include/linux/fs.h:3019 [inline]
  sock_alloc_inode+0x25/0x1c0 net/socket.c:308
  alloc_inode+0x5d/0x220 fs/inode.c:260
  new_inode_pseudo+0x16/0x80 fs/inode.c:1005
  sock_alloc+0x40/0x270 net/socket.c:634
  __sock_create+0xbc/0x800 net/socket.c:1535
  sock_create net/socket.c:1622 [inline]
  __sys_socket_create net/socket.c:1659 [inline]
  __sys_socket+0x14c/0x260 net/socket.c:1706
  __do_sys_socket net/socket.c:1720 [inline]
  __se_sys_socket net/socket.c:1718 [inline]
  __x64_sys_socket+0x72/0xb0 net/socket.c:1718
  do_syscall_x64 arch/x86/entry/common.c:52 [inline]
  do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
Freed by task 0:
  kasan_save_stack+0x33/0x50 mm/kasan/common.c:47
  kasan_save_track+0x14/0x30 mm/kasan/common.c:68
  kasan_save_free_info+0x3f/0x60 mm/kasan/generic.c:640
  poison_slab_object mm/kasan/common.c:241 [inline]
  __kasan_slab_free+0x121/0x1b0 mm/kasan/common.c:257
  kasan_slab_free include/linux/kasan.h:184 [inline]
  slab_free_hook mm/slub.c:2121 [inline]
  slab_free mm/slub.c:4299 [inline]
  kmem_cache_free+0x129/0x350 mm/slub.c:4363
  i_callback+0x43/0x70 fs/inode.c:249
  rcu_do_batch kernel/rcu/tree.c:2158 [inline]
  rcu_core+0x819/0x1680 kernel/rcu/tree.c:2433
  __do_softirq+0x21a/0x8de kernel/softirq.c:553
Last potentially related work creation:
  kasan_save_stack+0x33/0x50 mm/kasan/common.c:47
  __kasan_record_aux_stack+0xba/0x100 mm/kasan/generic.c:586
  __call_rcu_common.constprop.0+0x9a/0x7b0 kernel/rcu/tree.c:2683
  destroy_inode+0x129/0x1b0 fs/inode.c:315
  iput_final fs/inode.c:1739 [inline]
  iput.part.0+0x560/0x7b0 fs/inode.c:1765
  iput+0x5c/0x80 fs/inode.c:1755
  dentry_unlink_inode+0x292/0x430 fs/dcache.c:400
  __dentry_kill+0x1ca/0x5f0 fs/dcache.c:603
  dput.part.0+0x4ac/0x9a0 fs/dcache.c:845
  dput+0x1f/0x30 fs/dcache.c:835
  __fput+0x3b9/0xb70 fs/file_table.c:384
  task_work_run+0x14d/0x240 kernel/task_work.c:180
  exit_task_work include/linux/task_work.h:38 [inline]
  do_exit+0xa8a/0x2ad0 kernel/exit.c:871
  do_group_exit+0xd4/0x2a0 kernel/exit.c:1020
  __do_sys_exit_group kernel/exit.c:1031 [inline]
  __se_sys_exit_group kernel/exit.c:1029 [inline]
  __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1029
  do_syscall_x64 arch/x86/entry/common.c:52 [inline]
  do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
The buggy address belongs to the object at ffff88802f4fc800
 which belongs to the cache sock_inode_cache of size 1408
The buggy address is located 128 bytes inside of
 freed 1408-byte region [ffff88802f4fc800, ffff88802f4fcd80)
The buggy address belongs to the physical page:
page:ffffea0000bd3e00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2f4f8
head:ffffea0000bd3e00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
anon flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888013b06b40 0000000000000000 0000000000000001
raw: 0000000000000000 0000000080150015 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Reclaimable, gfp_mask 0xd20d0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_RECLAIMABLE), pid 4956, tgid 4956 (sshd), ts 31423924727, free_ts 0
  set_page_owner include/linux/page_owner.h:31 [inline]
  post_alloc_hook+0x2d0/0x350 mm/page_alloc.c:1533
  prep_new_page mm/page_alloc.c:1540 [inline]
  get_page_from_freelist+0xa28/0x3780 mm/page_alloc.c:3311
  __alloc_pages+0x22f/0x2440 mm/page_alloc.c:4567
  __alloc_pages_node include/linux/gfp.h:238 [inline]
  alloc_pages_node include/linux/gfp.h:261 [inline]
  alloc_slab_page mm/slub.c:2190 [inline]
  allocate_slab mm/slub.c:2354 [inline]
  new_slab+0xcc/0x3a0 mm/slub.c:2407
  ___slab_alloc+0x4af/0x19a0 mm/slub.c:3540
  __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3625
  __slab_alloc_node mm/slub.c:3678 [inline]
  slab_alloc_node mm/slub.c:3850 [inline]
  kmem_cache_alloc_lru+0x379/0x6f0 mm/slub.c:3879
  alloc_inode_sb include/linux/fs.h:3019 [inline]
  sock_alloc_inode+0x25/0x1c0 net/socket.c:308
  alloc_inode+0x5d/0x220 fs/inode.c:260
  new_inode_pseudo+0x16/0x80 fs/inode.c:1005
  sock_alloc+0x40/0x270 net/socket.c:634
  __sock_create+0xbc/0x800 net/socket.c:1535
  sock_create net/socket.c:1622 [inline]
  __sys_socket_create net/socket.c:1659 [inline]
  __sys_socket+0x14c/0x260 net/socket.c:1706
  __do_sys_socket net/socket.c:1720 [inline]
  __se_sys_socket net/socket.c:1718 [inline]
  __x64_sys_socket+0x72/0xb0 net/socket.c:1718
  do_syscall_x64 arch/x86/entry/common.c:52 [inline]
  do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
page_owner free stack trace missing
Memory state around the buggy address:
 ffff88802f4fc780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88802f4fc800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88802f4fc880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                   ^
 ffff88802f4fc900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88802f4fc980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
Fixes: 43815482370c ("net: sock_def_readable() and friends RCU conversion")
Reported-and-tested-by: syzbot+32b89eaa102b372ff76d(a)syzkaller.appspotmail.com
Signed-off-by: Eric Dumazet <edumazet(a)google.com>
Cc: Eric Biggers <ebiggers(a)google.com>
Cc: Kuniyuki Iwashima <kuniyu(a)amazon.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu(a)amazon.com>
Link: https://lore.kernel.org/r/20240126165532.3396702-1-edumazet@google.com
Signed-off-by: Paolo Abeni <pabeni(a)redhat.com>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
Signed-off-by: Liu Jian <liujian56(a)huawei.com>
---
 net/llc/af_llc.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c
index d23cd51efc5f..91ee9928d56f 100644
--- a/net/llc/af_llc.c
+++ b/net/llc/af_llc.c
@@ -219,6 +219,8 @@ static int llc_ui_release(struct socket *sock)
 	if (llc->dev)
 		dev_put(llc->dev);
 	sock_put(sk);
+	sock_orphan(sk);
+	sock->sk = NULL;
 	llc_sk_free(sk);
 out:
 	return 0;
-- 
2.34.1
                    
                  
                  
                          
                            
                            2
                            
                          
                          
                            
                            1
                            
                          
                          
                            
    
                          
                        
                    
                        
                            
                                
                            
                            [openeuler:openEuler-1.0-LTS] BUILD REGRESSION c0f28264ce70e762ccdf396767a85688e6ed4810
                        
                        
by kernel test robot 16 Mar '24
                    by kernel test robot 16 Mar '24
16 Mar '24
                    
                        tree/branch: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
branch HEAD: c0f28264ce70e762ccdf396767a85688e6ed4810  !5220  powerpc/mm: Fix null-pointer dereference in pgtable_cache_add
Error/Warning ids grouped by kconfigs:
gcc_recent_errors
|-- arm64-allmodconfig
|   |-- drivers-dma-pl330.c:warning:dst-may-be-used-uninitialized
|   `-- drivers-dma-pl330.c:warning:src-may-be-used-uninitialized
|-- arm64-defconfig
|   |-- drivers-dma-pl330.c:warning:dst-may-be-used-uninitialized
|   `-- drivers-dma-pl330.c:warning:src-may-be-used-uninitialized
|-- x86_64-buildonly-randconfig-002-20240315
|   `-- drivers-edac-skx_common.o:warning:objtool:missing-symbol-for-section-.init.text
`-- x86_64-buildonly-randconfig-003-20240315
    |-- drivers-gpu-drm-nouveau-include-nvkm-core-os.h:warning:reg-may-be-used-uninitialized
    `-- drivers-gpu-drm-nouveau-nvkm-engine-fifo-dmanv40.c:warning:ctx-may-be-used-uninitialized
clang_recent_errors
|-- x86_64-buildonly-randconfig-006-20240315
|   |-- net-appletalk-sysctl_net_atalk.o:warning:objtool:missing-symbol-for-section-.init.text
|   `-- net-can-j1939-main.o:warning:objtool:missing-symbol-for-section-.init.text
`-- x86_64-randconfig-r111-20240313
    |-- drivers-net-ethernet-3snic-sssnic-hw-.-tool-sss_tool_chip.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-const-noderef-__user-from-got-void
    |-- drivers-net-ethernet-3snic-sssnic-hw-.-tool-sss_tool_chip.c:sparse:sparse:incorrect-type-in-assignment-(different-base-types)-expected-unsigned-int-assigned-usertype-val32-got-restricted-__be32-userty
    |-- drivers-net-ethernet-3snic-sssnic-hw-.-tool-sss_tool_main.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-const-noderef-__user-from-got-void
    |-- drivers-net-ethernet-3snic-sssnic-hw-.-tool-sss_tool_main.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-const-noderef-__user-from-got-void-in_buf
    |-- drivers-net-ethernet-3snic-sssnic-hw-.-tool-sss_tool_main.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-noderef-__user-to-got-struct-sss_tool_ffm_record_info-ffm_
    |-- drivers-net-ethernet-3snic-sssnic-hw-.-tool-sss_tool_main.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-noderef-__user-to-got-void-out_buf
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_adapter_mgmt.c:sparse:sparse:symbol-g_chip_list-was-not-declared.-Should-it-be-static
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_common.c:sparse:sparse:incorrect-type-in-argument-(different-base-types)-expected-restricted-gfp_t-usertype-gfp-got-unsigned-int-flag
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwdev_export.c:sparse:sparse:dubious:x-y
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwdev_export.c:sparse:sparse:symbol-sss_rx_buf_size_level-was-not-declared.-Should-it-be-static
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwdev_mgmt_channel.c:sparse:sparse:symbol-g_mgmt_event_handler-was-not-declared.-Should-it-be-static
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwif_adm.c:sparse:sparse:cast-to-restricted-__be32
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwif_adm.c:sparse:sparse:cast-to-restricted-__be64
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwif_adm.c:sparse:sparse:incorrect-type-in-assignment-(different-base-types)-expected-unsigned-long-long-usertype-desc-got-restricted-__be64-usertype
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwif_adm.c:sparse:sparse:incorrect-type-in-assignment-(different-base-types)-expected-unsigned-long-long-usertype-got-restricted-__be64-usertype
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwif_adm.c:sparse:sparse:symbol-sss_adm_msg_read-was-not-declared.-Should-it-be-static
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwif_adm.c:sparse:sparse:symbol-sss_adm_msg_write-was-not-declared.-Should-it-be-static
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwif_adm_init.c:sparse:sparse:incorrect-type-in-argument-(different-base-types)-expected-unsigned-int-flag-got-restricted-gfp_t
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwif_adm_init.c:sparse:sparse:incorrect-type-in-assignment-(different-base-types)-expected-unsigned-long-long-usertype-hw_msg_paddr-got-restricted-__be64-usert
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwif_adm_init.c:sparse:sparse:incorrect-type-in-assignment-(different-base-types)-expected-unsigned-long-long-usertype-hw_wb_reply_paddr-got-restricted-__be64-
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwif_adm_init.c:sparse:sparse:incorrect-type-in-assignment-(different-base-types)-expected-unsigned-long-long-usertype-next_elem_paddr-got-restricted-__be64-us
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwif_adm_init.c:sparse:sparse:symbol-sss_destroy_adm_msg-was-not-declared.-Should-it-be-static
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwif_aeq.c:sparse:sparse:cast-to-restricted-__be32
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwif_aeq.c:sparse:sparse:incorrect-type-in-assignment-(different-base-types)-expected-unsigned-int-usertype-init_val-got-restricted-__be32-usertype
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwif_api.c:sparse:sparse:cast-to-restricted-__be32
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwif_api.c:sparse:sparse:incorrect-type-in-argument-(different-base-types)-expected-unsigned-int-val-got-restricted-__be32-usertype
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwif_ceq.c:sparse:sparse:cast-to-restricted-__be32
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwif_ceq.c:sparse:sparse:incorrect-type-in-assignment-(different-base-types)-expected-unsigned-int-usertype-init_val-got-restricted-__be32-usertype
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwif_ceq.c:sparse:sparse:symbol-sss_ceq_intr_handle-was-not-declared.-Should-it-be-static
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwif_ceq.c:sparse:sparse:symbol-sss_init_ceqe_desc-was-not-declared.-Should-it-be-static
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwif_ctrlq.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-volatile-noderef-__iomem-addr-got-unsigned-char-usertype
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwif_ctrlq.c:sparse:sparse:incorrect-type-in-initializer-(different-address-spaces)-expected-unsigned-char-usertype-db_base-got-unsigned-char-noderef-usertype-
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwif_ctrlq_init.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-noderef-__iomem-db_base-got-void-noderef-__iomem
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwif_ctrlq_init.c:sparse:sparse:symbol-sss_deinit_ctrlq-was-not-declared.-Should-it-be-static
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwif_eq.c:sparse:sparse:incorrect-type-in-argument-(different-base-types)-expected-unsigned-int-flag-got-restricted-gfp_t
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwif_init.c:sparse:sparse:cast-removes-address-space-__iomem-of-expression
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwif_init.c:sparse:sparse:incompatible-types-in-conditional-expression-(different-address-spaces):
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwif_mbx.c:sparse:sparse:cast-to-restricted-__be64
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwif_mbx.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-volatile-noderef-__iomem-addr-got-unsigned-char-usertype
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwif_mbx.c:sparse:sparse:incorrect-type-in-argument-(different-base-types)-expected-unsigned-int-val-got-restricted-__be32-usertype
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_hwif_mbx_init.c:sparse:sparse:incorrect-type-in-assignment-(different-address-spaces)-expected-unsigned-char-usertype-data-got-unsigned-char-noderef-usertype-_
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_pci_global.c:sparse:sparse:symbol-g_uld_mutex-was-not-declared.-Should-it-be-static
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_pci_probe.c:sparse:sparse:symbol-sss_attach_uld_driver-was-not-declared.-Should-it-be-static
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_wq.c:sparse:sparse:incorrect-type-in-argument-(different-base-types)-expected-unsigned-int-flag-got-restricted-gfp_t
    |-- drivers-net-ethernet-3snic-sssnic-hw-sss_wq.c:sparse:sparse:incorrect-type-in-assignment-(different-base-types)-expected-unsigned-long-long-usertype-got-restricted-__be64-usertype
    |-- drivers-net-ethernet-3snic-sssnic-include-hw-sss_hw_common.h:sparse:sparse:cast-to-restricted-__be32
    |-- drivers-net-ethernet-3snic-sssnic-include-hw-sss_hw_common.h:sparse:sparse:incorrect-type-in-assignment-(different-base-types)-expected-unsigned-int-usertype-got-restricted-__be32-usertype
    |-- drivers-net-ethernet-3snic-sssnic-nic-.-tool-sss_tool_nic_qp_info.c:sparse:sparse:cast-removes-address-space-__iomem-of-expression
    |-- drivers-net-ethernet-3snic-sssnic-nic-.-tool-sss_tool_nic_qp_info.c:sparse:sparse:incorrect-type-in-assignment-(different-base-types)-expected-unsigned-short-usertype-hw_pi-got-restricted-__be16-usert
    |-- drivers-net-ethernet-3snic-sssnic-nic-sss_nic_ethtool_api.c:sparse:sparse:symbol-sss_nic_finish_loop_test-was-not-declared.-Should-it-be-static
    |-- drivers-net-ethernet-3snic-sssnic-nic-sss_nic_ethtool_stats.o:warning:objtool:sss_nic_get_sset_count:can-t-find-switch-jump-table
    |-- drivers-net-ethernet-3snic-sssnic-nic-sss_nic_io.c:sparse:sparse:cast-removes-address-space-__iomem-of-expression
    |-- drivers-net-ethernet-3snic-sssnic-nic-sss_nic_io.c:sparse:sparse:incorrect-type-in-assignment-(different-address-spaces)-expected-unsigned-char-noderef-usertype-__iomem-rq_db_addr-got-unsigned-char-us
    |-- drivers-net-ethernet-3snic-sssnic-nic-sss_nic_io.c:sparse:sparse:incorrect-type-in-assignment-(different-address-spaces)-expected-unsigned-char-noderef-usertype-__iomem-sq_db_addr-got-unsigned-char-us
    |-- drivers-net-ethernet-3snic-sssnic-nic-sss_nic_io.h:sparse:sparse:cast-removes-address-space-__iomem-of-expression
    |-- drivers-net-ethernet-3snic-sssnic-nic-sss_nic_io.h:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-volatile-noderef-__iomem-addr-got-unsigned-long-long-usertype
    |-- drivers-net-ethernet-3snic-sssnic-nic-sss_nic_main.c:sparse:sparse:symbol-g_nic_uld_info-was-not-declared.-Should-it-be-static
    |-- drivers-net-ethernet-3snic-sssnic-nic-sss_nic_main.c:sparse:sparse:symbol-get_nic_uld_info-was-not-declared.-Should-it-be-static
    |-- drivers-net-ethernet-3snic-sssnic-nic-sss_nic_main.c:sparse:sparse:symbol-sss_nic_port_module_cable_plug-was-not-declared.-Should-it-be-static
    |-- drivers-net-ethernet-3snic-sssnic-nic-sss_nic_main.c:sparse:sparse:symbol-sss_nic_port_module_cable_unplug-was-not-declared.-Should-it-be-static
    |-- drivers-net-ethernet-3snic-sssnic-nic-sss_nic_main.c:sparse:sparse:symbol-sss_nic_port_module_link_err-was-not-declared.-Should-it-be-static
    |-- drivers-net-ethernet-3snic-sssnic-nic-sss_nic_main.o:warning:objtool:sss_nic_event:can-t-find-switch-jump-table
    |-- drivers-net-ethernet-3snic-sssnic-nic-sss_nic_netdev_ops.c:sparse:sparse:symbol-sss_nic_ndo_set_vf_link_state-was-not-declared.-Should-it-be-static
    |-- drivers-net-ethernet-3snic-sssnic-nic-sss_nic_netdev_ops.c:sparse:sparse:symbol-sss_nic_ndo_vlan_rx_add_vid-was-not-declared.-Should-it-be-static
    |-- drivers-net-ethernet-3snic-sssnic-nic-sss_nic_netdev_ops.c:sparse:sparse:symbol-sss_nic_ndo_vlan_rx_kill_vid-was-not-declared.-Should-it-be-static
    |-- drivers-net-ethernet-3snic-sssnic-nic-sss_nic_netdev_ops_api.c:sparse:sparse:cast-to-restricted-__be16
    |-- drivers-net-ethernet-3snic-sssnic-nic-sss_nic_netdev_ops_api.c:sparse:sparse:cast-to-restricted-__be32
    |-- drivers-net-ethernet-3snic-sssnic-nic-sss_nic_netdev_ops_api.c:sparse:sparse:restricted-__be32-degrades-to-integer
    |-- drivers-net-ethernet-3snic-sssnic-nic-sss_nic_ntuple.c:sparse:sparse:incorrect-type-in-assignment-(different-base-types)-expected-unsigned-int-usertype-dport-got-restricted-__be16-usertype-pdst
    |-- drivers-net-ethernet-3snic-sssnic-nic-sss_nic_ntuple.c:sparse:sparse:incorrect-type-in-assignment-(different-base-types)-expected-unsigned-int-usertype-sport-got-restricted-__be16-usertype-psrc
    |-- drivers-net-ethernet-3snic-sssnic-nic-sss_nic_ntuple.c:sparse:sparse:restricted-__be32-degrades-to-integer
    |-- drivers-net-ethernet-3snic-sssnic-nic-sss_nic_ntuple.c:sparse:sparse:symbol-sss_nic_flush_rx_flow_rule-was-not-declared.-Should-it-be-static
    |-- drivers-net-ethernet-3snic-sssnic-nic-sss_nic_ntuple.c:sparse:sparse:symbol-sss_nic_flush_tcam_list-was-not-declared.-Should-it-be-static
    |-- drivers-net-ethernet-3snic-sssnic-nic-sss_nic_ntuple.c:sparse:sparse:symbol-sss_nic_flush_tcam_node_list-was-not-declared.-Should-it-be-static
    |-- drivers-net-ethernet-3snic-sssnic-nic-sss_nic_rss.c:sparse:sparse:incorrect-type-in-assignment-(different-base-types)-expected-unsigned-int-usertype-got-restricted-__be32-usertype
    |-- drivers-net-ethernet-3snic-sssnic-nic-sss_nic_rss_cfg.c:sparse:sparse:incorrect-type-in-assignment-(different-base-types)-expected-unsigned-int-usertype-ctx-got-restricted-__be32-usertype
    |-- drivers-net-ethernet-3snic-sssnic-nic-sss_nic_rss_cfg.c:sparse:sparse:incorrect-type-in-assignment-(different-base-types)-expected-unsigned-int-usertype-got-restricted-__be32-usertype
    `-- drivers-net-ethernet-3snic-sssnic-nic-sss_nic_tx.c:sparse:sparse:restricted-__be16-degrades-to-integer
elapsed time: 731m
configs tested: 35
configs skipped: 145
tested configs:
arm64                            allmodconfig   gcc  
arm64                             allnoconfig   gcc  
arm64                               defconfig   gcc  
arm64                 randconfig-001-20240315   gcc  
arm64                 randconfig-002-20240315   gcc  
arm64                 randconfig-003-20240315   gcc  
arm64                 randconfig-004-20240315   gcc  
x86_64                            allnoconfig   clang
x86_64                           allyesconfig   clang
x86_64       buildonly-randconfig-001-20240315   gcc  
x86_64       buildonly-randconfig-002-20240315   gcc  
x86_64       buildonly-randconfig-003-20240315   gcc  
x86_64       buildonly-randconfig-004-20240315   gcc  
x86_64       buildonly-randconfig-005-20240315   clang
x86_64       buildonly-randconfig-006-20240315   clang
x86_64                              defconfig   gcc  
x86_64                randconfig-001-20240315   gcc  
x86_64                randconfig-002-20240315   clang
x86_64                randconfig-003-20240315   gcc  
x86_64                randconfig-004-20240315   clang
x86_64                randconfig-005-20240315   gcc  
x86_64                randconfig-006-20240315   gcc  
x86_64                randconfig-011-20240315   clang
x86_64                randconfig-012-20240315   gcc  
x86_64                randconfig-013-20240315   gcc  
x86_64                randconfig-014-20240315   gcc  
x86_64                randconfig-015-20240315   clang
x86_64                randconfig-016-20240315   clang
x86_64                randconfig-071-20240315   clang
x86_64                randconfig-072-20240315   clang
x86_64                randconfig-073-20240315   gcc  
x86_64                randconfig-074-20240315   gcc  
x86_64                randconfig-075-20240315   clang
x86_64                randconfig-076-20240315   clang
x86_64                          rhel-8.3-rust   clang
-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            0
                            
                          
                          
                            
    
                          
                        
                    
                        
                            
                                
                            
                            [openeuler:openEuler-1.0-LTS 21121/21871] drivers/net/ethernet/3snic/sssnic/hw/sss_pci_probe.c:276:5: sparse: sparse: symbol 'sss_attach_uld_driver' was not declared. Should it be static?
                        
                        
by kernel test robot 16 Mar '24
                    by kernel test robot 16 Mar '24
16 Mar '24
                    
                        tree:   https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head:   c0f28264ce70e762ccdf396767a85688e6ed4810
commit: a6a7981cbf66d4951425d33cdce6ef39206eba83 [21121/21871] Net: ethernet: Support 3snic 3s9xx network card
config: x86_64-randconfig-r111-20240313 (https://download.01.org/0day-ci/archive/20240316/202403160328.U3VDCuIj-lkp@…)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240316/202403160328.U3VDCuIj-lkp@…)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp(a)intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202403160328.U3VDCuIj-lkp@intel.com/
All warnings (new ones prefixed by >>):
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:65:5: sparse: sparse: symbol 'rx_buff_size' was not declared. Should it be static?
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:878:6: sparse: sparse: symbol 'sss_nic_port_module_cable_plug' was not declared. Should it be static?
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:884:6: sparse: sparse: symbol 'sss_nic_port_module_cable_unplug' was not declared. Should it be static?
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:890:6: sparse: sparse: symbol 'sss_nic_port_module_link_err' was not declared. Should it be static?
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:1020:21: sparse: sparse: symbol 'g_nic_uld_info' was not declared. Should it be static?
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:1029:21: sparse: sparse: symbol 'get_nic_uld_info' was not declared. Should it be static?
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:878:6: warning: no previous prototype for function 'sss_nic_port_module_cable_plug' [-Wmissing-prototypes]
     878 | void sss_nic_port_module_cable_plug(struct sss_nic_dev *nic_dev, void *event_data)
         |      ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:878:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     878 | void sss_nic_port_module_cable_plug(struct sss_nic_dev *nic_dev, void *event_data)
         | ^
         | static 
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:884:6: warning: no previous prototype for function 'sss_nic_port_module_cable_unplug' [-Wmissing-prototypes]
     884 | void sss_nic_port_module_cable_unplug(struct sss_nic_dev *nic_dev, void *event_data)
         |      ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:884:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     884 | void sss_nic_port_module_cable_unplug(struct sss_nic_dev *nic_dev, void *event_data)
         | ^
         | static 
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:890:6: warning: no previous prototype for function 'sss_nic_port_module_link_err' [-Wmissing-prototypes]
     890 | void sss_nic_port_module_link_err(struct sss_nic_dev *nic_dev, void *event_data)
         |      ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:890:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     890 | void sss_nic_port_module_link_err(struct sss_nic_dev *nic_dev, void *event_data)
         | ^
         | static 
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:1029:22: warning: no previous prototype for function 'get_nic_uld_info' [-Wmissing-prototypes]
    1029 | struct sss_uld_info *get_nic_uld_info(void)
         |                      ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:1029:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
    1029 | struct sss_uld_info *get_nic_uld_info(void)
         | ^
         | static 
   4 warnings generated.
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.o: warning: objtool: sss_nic_event()+0x1bd: can't find switch jump table
--
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_stats.c:44:5: sparse: sparse: symbol 'sss_nic_get_sset_count' was not declared. Should it be static?
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_stats.c:62:6: sparse: sparse: symbol 'sss_nic_get_ethtool_stats' was not declared. Should it be static?
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_stats.c:78:6: sparse: sparse: symbol 'sss_nic_get_strings' was not declared. Should it be static?
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_stats.c:98:5: sparse: sparse: symbol 'sss_nic_get_link_ksettings' was not declared. Should it be static?
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_stats.c:120:5: sparse: sparse: symbol 'sss_nic_set_link_ksettings' was not declared. Should it be static?
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_stats.c:44:5: warning: no previous prototype for function 'sss_nic_get_sset_count' [-Wmissing-prototypes]
      44 | int sss_nic_get_sset_count(struct net_device *netdev, int settings)
         |     ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_stats.c:44:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
      44 | int sss_nic_get_sset_count(struct net_device *netdev, int settings)
         | ^
         | static 
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_stats.c:62:6: warning: no previous prototype for function 'sss_nic_get_ethtool_stats' [-Wmissing-prototypes]
      62 | void sss_nic_get_ethtool_stats(struct net_device *netdev,
         |      ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_stats.c:62:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
      62 | void sss_nic_get_ethtool_stats(struct net_device *netdev,
         | ^
         | static 
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_stats.c:78:6: warning: no previous prototype for function 'sss_nic_get_strings' [-Wmissing-prototypes]
      78 | void sss_nic_get_strings(struct net_device *netdev, u32 stringset, u8 *buf)
         |      ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_stats.c:78:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
      78 | void sss_nic_get_strings(struct net_device *netdev, u32 stringset, u8 *buf)
         | ^
         | static 
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_stats.c:98:5: warning: no previous prototype for function 'sss_nic_get_link_ksettings' [-Wmissing-prototypes]
      98 | int sss_nic_get_link_ksettings(struct net_device *net_dev,
         |     ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_stats.c:98:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
      98 | int sss_nic_get_link_ksettings(struct net_device *net_dev,
         | ^
         | static 
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_stats.c:120:5: warning: no previous prototype for function 'sss_nic_set_link_ksettings' [-Wmissing-prototypes]
     120 | int sss_nic_set_link_ksettings(struct net_device *netdev,
         |     ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_stats.c:120:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     120 | int sss_nic_set_link_ksettings(struct net_device *netdev,
         | ^
         | static 
   5 warnings generated.
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_stats.o: warning: objtool: sss_nic_get_sset_count()+0x4a: can't find switch jump table
--
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:878:6: warning: no previous prototype for function 'sss_nic_port_module_cable_plug' [-Wmissing-prototypes]
     878 | void sss_nic_port_module_cable_plug(struct sss_nic_dev *nic_dev, void *event_data)
         |      ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:878:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     878 | void sss_nic_port_module_cable_plug(struct sss_nic_dev *nic_dev, void *event_data)
         | ^
         | static 
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:884:6: warning: no previous prototype for function 'sss_nic_port_module_cable_unplug' [-Wmissing-prototypes]
     884 | void sss_nic_port_module_cable_unplug(struct sss_nic_dev *nic_dev, void *event_data)
         |      ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:884:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     884 | void sss_nic_port_module_cable_unplug(struct sss_nic_dev *nic_dev, void *event_data)
         | ^
         | static 
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:890:6: warning: no previous prototype for function 'sss_nic_port_module_link_err' [-Wmissing-prototypes]
     890 | void sss_nic_port_module_link_err(struct sss_nic_dev *nic_dev, void *event_data)
         |      ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:890:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     890 | void sss_nic_port_module_link_err(struct sss_nic_dev *nic_dev, void *event_data)
         | ^
         | static 
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:1029:22: warning: no previous prototype for function 'get_nic_uld_info' [-Wmissing-prototypes]
    1029 | struct sss_uld_info *get_nic_uld_info(void)
         |                      ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:1029:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
    1029 | struct sss_uld_info *get_nic_uld_info(void)
         | ^
         | static 
   4 warnings generated.
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.o: warning: objtool: sss_nic_event()+0x1bd: can't find switch jump table
--
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_stats.c:44:5: warning: no previous prototype for function 'sss_nic_get_sset_count' [-Wmissing-prototypes]
      44 | int sss_nic_get_sset_count(struct net_device *netdev, int settings)
         |     ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_stats.c:44:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
      44 | int sss_nic_get_sset_count(struct net_device *netdev, int settings)
         | ^
         | static 
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_stats.c:62:6: warning: no previous prototype for function 'sss_nic_get_ethtool_stats' [-Wmissing-prototypes]
      62 | void sss_nic_get_ethtool_stats(struct net_device *netdev,
         |      ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_stats.c:62:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
      62 | void sss_nic_get_ethtool_stats(struct net_device *netdev,
         | ^
         | static 
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_stats.c:78:6: warning: no previous prototype for function 'sss_nic_get_strings' [-Wmissing-prototypes]
      78 | void sss_nic_get_strings(struct net_device *netdev, u32 stringset, u8 *buf)
         |      ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_stats.c:78:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
      78 | void sss_nic_get_strings(struct net_device *netdev, u32 stringset, u8 *buf)
         | ^
         | static 
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_stats.c:98:5: warning: no previous prototype for function 'sss_nic_get_link_ksettings' [-Wmissing-prototypes]
      98 | int sss_nic_get_link_ksettings(struct net_device *net_dev,
         |     ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_stats.c:98:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
      98 | int sss_nic_get_link_ksettings(struct net_device *net_dev,
         | ^
         | static 
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_stats.c:120:5: warning: no previous prototype for function 'sss_nic_set_link_ksettings' [-Wmissing-prototypes]
     120 | int sss_nic_set_link_ksettings(struct net_device *netdev,
         |     ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_stats.c:120:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     120 | int sss_nic_set_link_ksettings(struct net_device *netdev,
         | ^
         | static 
   5 warnings generated.
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_stats.o: warning: objtool: sss_nic_get_sset_count()+0x4a: can't find switch jump table
sparse warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/3snic/sssnic/hw/sss_pci_probe.c:276:5: sparse: sparse: symbol 'sss_attach_uld_driver' was not declared. Should it be static?
   drivers/net/ethernet/3snic/sssnic/hw/sss_pci_probe.c:276:5: warning: no previous prototype for function 'sss_attach_uld_driver' [-Wmissing-prototypes]
     276 | int sss_attach_uld_driver(struct sss_pci_adapter *adapter,
         |     ^
   drivers/net/ethernet/3snic/sssnic/hw/sss_pci_probe.c:276:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     276 | int sss_attach_uld_driver(struct sss_pci_adapter *adapter,
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/hw/sss_pci_probe.c:548:5: warning: no previous prototype for function 'sss_pci_probe' [-Wmissing-prototypes]
     548 | int sss_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
         |     ^
   drivers/net/ethernet/3snic/sssnic/hw/sss_pci_probe.c:548:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     548 | int sss_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
         | ^
         | static
   2 warnings generated.
--
>> drivers/net/ethernet/3snic/sssnic/hw/sss_pci_global.c:35:14: sparse: sparse: symbol 'g_uld_mutex' was not declared. Should it be static?
   drivers/net/ethernet/3snic/sssnic/hw/sss_pci_global.c:37:6: warning: no previous prototype for function 'sss_init_uld_lock' [-Wmissing-prototypes]
      37 | void sss_init_uld_lock(void)
         |      ^
   drivers/net/ethernet/3snic/sssnic/hw/sss_pci_global.c:37:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
      37 | void sss_init_uld_lock(void)
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/hw/sss_pci_global.c:42:6: warning: no previous prototype for function 'sss_lock_uld' [-Wmissing-prototypes]
      42 | void sss_lock_uld(void)
         |      ^
   drivers/net/ethernet/3snic/sssnic/hw/sss_pci_global.c:42:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
      42 | void sss_lock_uld(void)
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/hw/sss_pci_global.c:47:6: warning: no previous prototype for function 'sss_unlock_uld' [-Wmissing-prototypes]
      47 | void sss_unlock_uld(void)
         |      ^
   drivers/net/ethernet/3snic/sssnic/hw/sss_pci_global.c:47:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
      47 | void sss_unlock_uld(void)
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/hw/sss_pci_global.c:52:14: warning: no previous prototype for function 'sss_get_uld_names' [-Wmissing-prototypes]
      52 | const char **sss_get_uld_names(void)
         |              ^
   drivers/net/ethernet/3snic/sssnic/hw/sss_pci_global.c:52:7: note: declare 'static' if the function is not intended to be used outside of this translation unit
      52 | const char **sss_get_uld_names(void)
         |       ^
         |       static
   drivers/net/ethernet/3snic/sssnic/hw/sss_pci_global.c:57:22: warning: no previous prototype for function 'sss_get_uld_info' [-Wmissing-prototypes]
      57 | struct sss_uld_info *sss_get_uld_info(void)
         |                      ^
   drivers/net/ethernet/3snic/sssnic/hw/sss_pci_global.c:57:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
      57 | struct sss_uld_info *sss_get_uld_info(void)
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/hw/sss_pci_global.c:62:6: warning: no previous prototype for function 'sss_attach_is_enable' [-Wmissing-prototypes]
      62 | bool sss_attach_is_enable(void)
         |      ^
   drivers/net/ethernet/3snic/sssnic/hw/sss_pci_global.c:62:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
      62 | bool sss_attach_is_enable(void)
         | ^
         | static
   6 warnings generated.
--
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwdev_export.c:38:11: sparse: sparse: symbol 'sss_rx_buf_size_level' was not declared. Should it be static?
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwdev_export.c:137:15: sparse: sparse: dubious: !x & y
--
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwdev_mgmt_channel.c:286:29: sparse: sparse: symbol 'g_mgmt_event_handler' was not declared. Should it be static?
--
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ctrlq.c:311:54: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned char [usertype] *db_base @@     got unsigned char [noderef] [usertype] __iomem *db_base @@
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ctrlq.c:311:54: sparse:     expected unsigned char [usertype] *db_base
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ctrlq.c:311:54: sparse:     got unsigned char [noderef] [usertype] __iomem *db_base
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ctrlq.c:320:31: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got unsigned char [usertype] * @@
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ctrlq.c:320:31: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ctrlq.c:320:31: sparse:     got unsigned char [usertype] *
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ctrlq.c:533:12: sparse: sparse: context imbalance in 'sss_ctrlq_msg_lock' - different lock contexts for basic block
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ctrlq.c:547:13: sparse: sparse: context imbalance in 'sss_ctrlq_msg_unlock' - unexpected unlock
--
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ctrlq_init.c:327:41: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __iomem **db_base @@     got void [noderef] __iomem * @@
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ctrlq_init.c:327:41: sparse:     expected void [noderef] __iomem **db_base
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ctrlq_init.c:327:41: sparse:     got void [noderef] __iomem *
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ctrlq_init.c:277:5: warning: no previous prototype for function 'sss_reinit_ctrlq_ctx' [-Wmissing-prototypes]
     277 | int sss_reinit_ctrlq_ctx(struct sss_hwdev *hwdev)
         |     ^
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ctrlq_init.c:277:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     277 | int sss_reinit_ctrlq_ctx(struct sss_hwdev *hwdev)
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ctrlq_init.c:367:6: warning: no previous prototype for function 'sss_deinit_ctrlq' [-Wmissing-prototypes]
     367 | void sss_deinit_ctrlq(struct sss_hwdev *hwdev)
         |      ^
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ctrlq_init.c:367:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     367 | void sss_deinit_ctrlq(struct sss_hwdev *hwdev)
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ctrlq_init.c:501:5: warning: no previous prototype for function 'sss_init_ctrlq_channel' [-Wmissing-prototypes]
     501 | int sss_init_ctrlq_channel(struct sss_hwdev *hwdev)
         |     ^
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ctrlq_init.c:501:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     501 | int sss_init_ctrlq_channel(struct sss_hwdev *hwdev)
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ctrlq_init.c:538:6: warning: no previous prototype for function 'sss_deinit_ctrlq_channel' [-Wmissing-prototypes]
     538 | void sss_deinit_ctrlq_channel(struct sss_hwdev *hwdev)
         |      ^
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ctrlq_init.c:538:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     538 | void sss_deinit_ctrlq_channel(struct sss_hwdev *hwdev)
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ctrlq_init.c:547:6: warning: no previous prototype for function 'sss_ctrlq_flush_sync_cmd' [-Wmissing-prototypes]
     547 | void sss_ctrlq_flush_sync_cmd(struct sss_hwdev *hwdev)
         |      ^
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ctrlq_init.c:547:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     547 | void sss_ctrlq_flush_sync_cmd(struct sss_hwdev *hwdev)
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ctrlq_init.c:573:5: warning: no previous prototype for function 'sss_wait_ctrlq_stop' [-Wmissing-prototypes]
     573 | int sss_wait_ctrlq_stop(struct sss_hwdev *hwdev)
         |     ^
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ctrlq_init.c:573:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     573 | int sss_wait_ctrlq_stop(struct sss_hwdev *hwdev)
         | ^
         | static
   6 warnings generated.
--
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_mbx.c:294:30: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int val @@     got restricted __be32 [usertype] @@
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_mbx.c:294:30: sparse:     expected unsigned int val
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_mbx.c:294:30: sparse:     got restricted __be32 [usertype]
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_mbx.c:294:73: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got unsigned char [usertype] * @@
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_mbx.c:294:73: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_mbx.c:294:73: sparse:     got unsigned char [usertype] *
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_mbx.c:312:30: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int val @@     got restricted __be32 [usertype] @@
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_mbx.c:312:30: sparse:     expected unsigned int val
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_mbx.c:312:30: sparse:     got restricted __be32 [usertype]
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_mbx.c:313:67: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got unsigned char [usertype] * @@
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_mbx.c:313:67: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_mbx.c:313:67: sparse:     got unsigned char [usertype] *
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_mbx.c:364:19: sparse: sparse: cast to restricted __be64
--
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_mbx_init.c:346:24: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected unsigned char [usertype] *data @@     got unsigned char [noderef] [usertype] __iomem * @@
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_mbx_init.c:346:24: sparse:     expected unsigned char [usertype] *data
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_mbx_init.c:346:24: sparse:     got unsigned char [noderef] [usertype] __iomem *
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_mbx_init.c: note: in included file (through include/linux/bitops.h, include/linux/kernel.h, include/linux/list.h, ...):
   arch/x86/include/asm/bitops.h:111:37: sparse: sparse: cast truncates bits from constant value (ffffff7f becomes 7f)
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_mbx_init.c:252:5: warning: no previous prototype for function 'sss_init_func_mbx_msg' [-Wmissing-prototypes]
     252 | int sss_init_func_mbx_msg(void *hwdev, u16 func_num)
         |     ^
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_mbx_init.c:252:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     252 | int sss_init_func_mbx_msg(void *hwdev, u16 func_num)
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_mbx_init.c:401:5: warning: no previous prototype for function 'sss_hwif_init_mbx' [-Wmissing-prototypes]
     401 | int sss_hwif_init_mbx(struct sss_hwdev *hwdev)
         |     ^
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_mbx_init.c:401:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     401 | int sss_hwif_init_mbx(struct sss_hwdev *hwdev)
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_mbx_init.c:449:6: warning: no previous prototype for function 'sss_hwif_deinit_mbx' [-Wmissing-prototypes]
     449 | void sss_hwif_deinit_mbx(struct sss_hwdev *hwdev)
         |      ^
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_mbx_init.c:449:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     449 | void sss_hwif_deinit_mbx(struct sss_hwdev *hwdev)
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_mbx_init.c:872:6: warning: no previous prototype for function 'sss_recv_mbx_aeq_handler' [-Wmissing-prototypes]
     872 | void sss_recv_mbx_aeq_handler(void *handle, u8 *header, u8 size)
         |      ^
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_mbx_init.c:872:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     872 | void sss_recv_mbx_aeq_handler(void *handle, u8 *header, u8 size)
         | ^
         | static
   4 warnings generated.
--
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:213:31: sparse: sparse: cast to restricted __be64
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:275:20: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [usertype] @@     got restricted __be64 [usertype] @@
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:275:20: sparse:     expected unsigned long long [usertype]
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:275:20: sparse:     got restricted __be64 [usertype]
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:328:20: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [usertype] desc @@     got restricted __be64 [usertype] @@
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:328:20: sparse:     expected unsigned long long [usertype] desc
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:328:20: sparse:     got restricted __be64 [usertype]
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:368:20: sparse: sparse: cast to restricted __be32
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:372:25: sparse: sparse: cast to restricted __be64
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:409:23: sparse: sparse: cast to restricted __be64
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:500:9: sparse: sparse: context imbalance in 'sss_adm_msg_lock' - wrong count at exit
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:509:28: sparse: sparse: context imbalance in 'sss_adm_msg_unlock' - unexpected unlock
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:545:5: warning: no previous prototype for function 'sss_adm_msg_write' [-Wmissing-prototypes]
     545 | int sss_adm_msg_write(struct sss_adm_msg *adm_msg, u8 node_id,
         |     ^
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:545:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     545 | int sss_adm_msg_write(struct sss_adm_msg *adm_msg, u8 node_id,
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:551:5: warning: no previous prototype for function 'sss_adm_msg_read' [-Wmissing-prototypes]
     551 | int sss_adm_msg_read(struct sss_adm_msg *adm_msg, u8 node_id,
         |     ^
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:551:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     551 | int sss_adm_msg_read(struct sss_adm_msg *adm_msg, u8 node_id,
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:597:5: warning: no previous prototype for function 'sss_adm_msg_read_ack' [-Wmissing-prototypes]
     597 | int sss_adm_msg_read_ack(void *hwdev, u8 dest, const void *cmd,
         |     ^
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:597:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     597 | int sss_adm_msg_read_ack(void *hwdev, u8 dest, const void *cmd,
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:618:5: warning: no previous prototype for function 'sss_adm_msg_write_nack' [-Wmissing-prototypes]
     618 | int sss_adm_msg_write_nack(void *hwdev, u8 dest, const void *cmd, u16 size)
         |     ^
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:618:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     618 | int sss_adm_msg_write_nack(void *hwdev, u8 dest, const void *cmd, u16 size)
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:682:5: warning: no previous prototype for function 'sss_sync_send_adm_msg' [-Wmissing-prototypes]
     682 | int sss_sync_send_adm_msg(void *hwdev, u8 mod, u16 cmd, void *buf_in,
         |     ^
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:682:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     682 | int sss_sync_send_adm_msg(void *hwdev, u8 mod, u16 cmd, void *buf_in,
         | ^
         | static
   5 warnings generated.
--
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:272:34: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [usertype] hw_msg_paddr @@     got restricted __be64 [usertype] @@
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:272:34: sparse:     expected unsigned long long [usertype] hw_msg_paddr
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:272:34: sparse:     got restricted __be64 [usertype]
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:288:38: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [usertype] hw_wb_reply_paddr @@     got restricted __be64 [usertype] @@
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:288:38: sparse:     expected unsigned long long [usertype] hw_wb_reply_paddr
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:288:38: sparse:     got restricted __be64 [usertype]
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:310:33: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [usertype] hw_msg_paddr @@     got restricted __be64 [usertype] @@
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:310:33: sparse:     expected unsigned long long [usertype] hw_msg_paddr
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:310:33: sparse:     got restricted __be64 [usertype]
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:328:38: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [usertype] hw_wb_reply_paddr @@     got restricted __be64 [usertype] @@
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:328:38: sparse:     expected unsigned long long [usertype] hw_wb_reply_paddr
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:328:38: sparse:     got restricted __be64 [usertype]
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:391:50: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [usertype] next_elem_paddr @@     got restricted __be64 [usertype] @@
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:391:50: sparse:     expected unsigned long long [usertype] next_elem_paddr
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:391:50: sparse:     got restricted __be64 [usertype]
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:400:31: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [usertype] next_elem_paddr @@     got restricted __be64 [usertype] @@
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:400:31: sparse:     expected unsigned long long [usertype] next_elem_paddr
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:400:31: sparse:     got restricted __be64 [usertype]
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:463:45: sparse: sparse: incorrect type in argument 4 (different base types) @@     expected unsigned int flag @@     got restricted gfp_t @@
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:463:45: sparse:     expected unsigned int flag
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:463:45: sparse:     got restricted gfp_t
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:580:6: sparse: sparse: symbol 'sss_destroy_adm_msg' was not declared. Should it be static?
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:580:6: warning: no previous prototype for function 'sss_destroy_adm_msg' [-Wmissing-prototypes]
     580 | void sss_destroy_adm_msg(struct sss_adm_msg *adm_msg)
         |      ^
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:580:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     580 | void sss_destroy_adm_msg(struct sss_adm_msg *adm_msg)
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:689:5: warning: no previous prototype for function 'sss_hwif_init_adm' [-Wmissing-prototypes]
     689 | int sss_hwif_init_adm(struct sss_hwdev *hwdev)
         |     ^
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:689:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     689 | int sss_hwif_init_adm(struct sss_hwdev *hwdev)
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:738:6: warning: no previous prototype for function 'sss_hwif_deinit_adm' [-Wmissing-prototypes]
     738 | void sss_hwif_deinit_adm(struct sss_hwdev *hwdev)
         |      ^
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:738:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     738 | void sss_hwif_deinit_adm(struct sss_hwdev *hwdev)
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:752:6: warning: no previous prototype for function 'sss_complete_adm_event' [-Wmissing-prototypes]
     752 | void sss_complete_adm_event(struct sss_hwdev *hwdev)
         |      ^
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:752:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     752 | void sss_complete_adm_event(struct sss_hwdev *hwdev)
         | ^
         | static
   4 warnings generated.
--
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_init.c:311:32: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_init.c:309:54: sparse: sparse: incompatible types in conditional expression (different address spaces):
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_init.c:309:54: sparse:    void [noderef] __iomem *
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_init.c:309:54: sparse:    unsigned char [usertype] *
--
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_api.c:31:24: sparse: sparse: cast to restricted __be32
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_api.c:34:24: sparse: sparse: cast to restricted __be32
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_api.c:41:24: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int val @@     got restricted __be32 [usertype] @@
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_api.c:41:24: sparse:     expected unsigned int val
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_api.c:41:24: sparse:     got restricted __be32 [usertype]
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_api.c:44:24: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected unsigned int val @@     got restricted __be32 [usertype] @@
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_api.c:44:24: sparse:     expected unsigned int val
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_api.c:44:24: sparse:     got restricted __be32 [usertype]
--
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_eq.c:138:67: sparse: sparse: incorrect type in argument 4 (different base types) @@     expected unsigned int flag @@     got restricted gfp_t @@
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_eq.c:138:67: sparse:     expected unsigned int flag
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_eq.c:138:67: sparse:     got restricted gfp_t
--
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_aeq.c:153:18: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] init_val @@     got restricted __be32 [usertype] @@
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_aeq.c:153:18: sparse:     expected unsigned int [usertype] init_val
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_aeq.c:153:18: sparse:     got restricted __be32 [usertype]
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_aeq.c:238:24: sparse: sparse: cast to restricted __be32
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_aeq.c:408:17: sparse: sparse: cast to restricted __be32
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_aeq.c: note: in included file (through drivers/net/ethernet/3snic/sssnic/hw/include/sss_hwdev.h):
>> drivers/net/ethernet/3snic/sssnic/include/hw/sss_hw_common.h:99:26: sparse: sparse: cast to restricted __be32
>> drivers/net/ethernet/3snic/sssnic/include/hw/sss_hw_common.h:99:26: sparse: sparse: cast to restricted __be32
--
>> drivers/net/ethernet/3snic/sssnic/hw/sss_common.c:30:14: sparse: sparse: incorrect type in argument 4 (different base types) @@     expected restricted gfp_t [usertype] gfp @@     got unsigned int flag @@
   drivers/net/ethernet/3snic/sssnic/hw/sss_common.c:30:14: sparse:     expected restricted gfp_t [usertype] gfp
   drivers/net/ethernet/3snic/sssnic/hw/sss_common.c:30:14: sparse:     got unsigned int flag
   drivers/net/ethernet/3snic/sssnic/hw/sss_common.c:42:14: sparse: sparse: incorrect type in argument 4 (different base types) @@     expected restricted gfp_t [usertype] gfp @@     got unsigned int flag @@
   drivers/net/ethernet/3snic/sssnic/hw/sss_common.c:42:14: sparse:     expected restricted gfp_t [usertype] gfp
   drivers/net/ethernet/3snic/sssnic/hw/sss_common.c:42:14: sparse:     got unsigned int flag
--
>> drivers/net/ethernet/3snic/sssnic/hw/sss_wq.c:48:36: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [usertype] @@     got restricted __be64 [usertype] @@
   drivers/net/ethernet/3snic/sssnic/hw/sss_wq.c:48:36: sparse:     expected unsigned long long [usertype]
   drivers/net/ethernet/3snic/sssnic/hw/sss_wq.c:48:36: sparse:     got restricted __be64 [usertype]
>> drivers/net/ethernet/3snic/sssnic/hw/sss_wq.c:72:68: sparse: sparse: incorrect type in argument 4 (different base types) @@     expected unsigned int flag @@     got restricted gfp_t @@
   drivers/net/ethernet/3snic/sssnic/hw/sss_wq.c:72:68: sparse:     expected unsigned int flag
   drivers/net/ethernet/3snic/sssnic/hw/sss_wq.c:72:68: sparse:     got restricted gfp_t
--
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ceq.c:102:18: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] init_val @@     got restricted __be32 [usertype] @@
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ceq.c:102:18: sparse:     expected unsigned int [usertype] init_val
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ceq.c:102:18: sparse:     got restricted __be32 [usertype]
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ceq.c:95:6: sparse: sparse: symbol 'sss_init_ceqe_desc' was not declared. Should it be static?
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ceq.c:130:13: sparse: sparse: symbol 'sss_ceq_intr_handle' was not declared. Should it be static?
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ceq.c:174:24: sparse: sparse: cast to restricted __be32
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ceq.c:377:17: sparse: sparse: cast to restricted __be32
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ceq.c:95:6: warning: no previous prototype for function 'sss_init_ceqe_desc' [-Wmissing-prototypes]
      95 | void sss_init_ceqe_desc(void *data)
         |      ^
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ceq.c:95:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
      95 | void sss_init_ceqe_desc(void *data)
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ceq.c:130:13: warning: no previous prototype for function 'sss_ceq_intr_handle' [-Wmissing-prototypes]
     130 | irqreturn_t sss_ceq_intr_handle(int irq, void *data)
         |             ^
   drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_ceq.c:130:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     130 | irqreturn_t sss_ceq_intr_handle(int irq, void *data)
         | ^
         | static
   2 warnings generated.
--
>> drivers/net/ethernet/3snic/sssnic/hw/sss_adapter_mgmt.c:64:1: sparse: sparse: symbol 'g_chip_list' was not declared. Should it be static?
--
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:80:6: sparse: sparse: symbol 'sss_tool_free_in_buf' was not declared. Should it be static?
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:91:6: sparse: sparse: symbol 'sss_tool_free_out_buf' was not declared. Should it be static?
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:104:5: sparse: sparse: symbol 'sss_tool_alloc_in_buf' was not declared. Should it be static?
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:146:5: sparse: sparse: symbol 'sss_tool_alloc_out_buf' was not declared. Should it be static?
>> drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:189:42: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] __user *to @@     got void *out_buf @@
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:189:42: sparse:     expected void [noderef] __user *to
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:189:42: sparse:     got void *out_buf
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:194:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] __user *to @@     got void *out_buf @@
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:194:34: sparse:     expected void [noderef] __user *to
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:194:34: sparse:     got void *out_buf
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:182:5: sparse: sparse: symbol 'sss_tool_copy_to_user' was not declared. Should it be static?
>> drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:211:45: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] __user *from @@     got void *in_buf @@
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:211:45: sparse:     expected void const [noderef] __user *from
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:211:45: sparse:     got void *in_buf
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:238:36: sparse: sparse: symbol 'g_deal_msg_handle' was not declared. Should it be static?
>> drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:318:40: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] __user *from @@     got void * @@
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:318:40: sparse:     expected void const [noderef] __user *from
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:318:40: sparse:     got void *
>> drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:380:42: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] __user *to @@     got struct sss_tool_ffm_record_info *ffm_rd @@
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:380:42: sparse:     expected void [noderef] __user *to
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:380:42: sparse:     got struct sss_tool_ffm_record_info *ffm_rd
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:416:37: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] __user *from @@     got void * @@
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:416:37: sparse:     expected void const [noderef] __user *from
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:416:37: sparse:     got void *
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:80:6: warning: no previous prototype for function 'sss_tool_free_in_buf' [-Wmissing-prototypes]
      80 | void sss_tool_free_in_buf(void *hwdev, const struct sss_tool_msg *tool_msg, void *in_buf)
         |      ^
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:80:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
      80 | void sss_tool_free_in_buf(void *hwdev, const struct sss_tool_msg *tool_msg, void *in_buf)
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:91:6: warning: no previous prototype for function 'sss_tool_free_out_buf' [-Wmissing-prototypes]
      91 | void sss_tool_free_out_buf(void *hwdev, struct sss_tool_msg *tool_msg,
         |      ^
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:91:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
      91 | void sss_tool_free_out_buf(void *hwdev, struct sss_tool_msg *tool_msg,
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:104:5: warning: no previous prototype for function 'sss_tool_alloc_in_buf' [-Wmissing-prototypes]
     104 | int sss_tool_alloc_in_buf(void *hwdev, struct sss_tool_msg *tool_msg,
         |     ^
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:104:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     104 | int sss_tool_alloc_in_buf(void *hwdev, struct sss_tool_msg *tool_msg,
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:146:5: warning: no previous prototype for function 'sss_tool_alloc_out_buf' [-Wmissing-prototypes]
     146 | int sss_tool_alloc_out_buf(void *hwdev, struct sss_tool_msg *tool_msg,
         |     ^
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:146:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     146 | int sss_tool_alloc_out_buf(void *hwdev, struct sss_tool_msg *tool_msg,
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:182:5: warning: no previous prototype for function 'sss_tool_copy_to_user' [-Wmissing-prototypes]
     182 | int sss_tool_copy_to_user(struct sss_tool_msg *tool_msg,
         |     ^
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:182:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     182 | int sss_tool_copy_to_user(struct sss_tool_msg *tool_msg,
         | ^
         | static
   5 warnings generated.
--
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_chip.c:498:5: sparse: sparse: symbol 'sss_tool_send_clp_msg' was not declared. Should it be static?
>> drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_chip.c:604:28: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [assigned] [usertype] val32 @@     got restricted __be32 [usertype] @@
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_chip.c:604:28: sparse:     expected unsigned int [assigned] [usertype] val32
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_chip.c:604:28: sparse:     got restricted __be32 [usertype]
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_chip.c:606:28: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [assigned] [usertype] val32 @@     got restricted __be32 [usertype] @@
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_chip.c:606:28: sparse:     expected unsigned int [assigned] [usertype] val32
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_chip.c:606:28: sparse:     got restricted __be32 [usertype]
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_chip.c:588:5: sparse: sparse: symbol 'sss_tool_adm_csr_rd32' was not declared. Should it be static?
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_chip.c:635:28: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [assigned] [usertype] val32 @@     got restricted __be32 [usertype] @@
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_chip.c:635:28: sparse:     expected unsigned int [assigned] [usertype] val32
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_chip.c:635:28: sparse:     got restricted __be32 [usertype]
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_chip.c:637:28: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [assigned] [usertype] val32 @@     got restricted __be32 [usertype] @@
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_chip.c:637:28: sparse:     expected unsigned int [assigned] [usertype] val32
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_chip.c:637:28: sparse:     got restricted __be32 [usertype]
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_chip.c:621:5: sparse: sparse: symbol 'sss_tool_adm_csr_wr32' was not declared. Should it be static?
>> drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_chip.c:704:35: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] __user *from @@     got void * @@
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_chip.c:704:35: sparse:     expected void const [noderef] __user *from
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_chip.c:704:35: sparse:     got void *
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_chip.c:498:5: warning: no previous prototype for function 'sss_tool_send_clp_msg' [-Wmissing-prototypes]
     498 | int sss_tool_send_clp_msg(struct sss_hwdev *hwdev, u8 mod, u16 cmd, const void *buf_in,
         |     ^
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_chip.c:498:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     498 | int sss_tool_send_clp_msg(struct sss_hwdev *hwdev, u8 mod, u16 cmd, const void *buf_in,
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_chip.c:588:5: warning: no previous prototype for function 'sss_tool_adm_csr_rd32' [-Wmissing-prototypes]
     588 | int sss_tool_adm_csr_rd32(struct sss_hwdev *hwdev, u8 dest, u32 addr, u32 *val)
         |     ^
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_chip.c:588:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     588 | int sss_tool_adm_csr_rd32(struct sss_hwdev *hwdev, u8 dest, u32 addr, u32 *val)
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_chip.c:621:5: warning: no previous prototype for function 'sss_tool_adm_csr_wr32' [-Wmissing-prototypes]
     621 | int sss_tool_adm_csr_wr32(struct sss_hwdev *hwdev, u8 dest, u32 addr, u32 val)
         |     ^
   drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_chip.c:621:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     621 | int sss_tool_adm_csr_wr32(struct sss_hwdev *hwdev, u8 dest, u32 addr, u32 val)
         | ^
         | static
   3 warnings generated.
--
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:878:6: sparse: sparse: symbol 'sss_nic_port_module_cable_plug' was not declared. Should it be static?
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:884:6: sparse: sparse: symbol 'sss_nic_port_module_cable_unplug' was not declared. Should it be static?
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:890:6: sparse: sparse: symbol 'sss_nic_port_module_link_err' was not declared. Should it be static?
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:1020:21: sparse: sparse: symbol 'g_nic_uld_info' was not declared. Should it be static?
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:1029:21: sparse: sparse: symbol 'get_nic_uld_info' was not declared. Should it be static?
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:878:6: warning: no previous prototype for function 'sss_nic_port_module_cable_plug' [-Wmissing-prototypes]
     878 | void sss_nic_port_module_cable_plug(struct sss_nic_dev *nic_dev, void *event_data)
         |      ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:878:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     878 | void sss_nic_port_module_cable_plug(struct sss_nic_dev *nic_dev, void *event_data)
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:884:6: warning: no previous prototype for function 'sss_nic_port_module_cable_unplug' [-Wmissing-prototypes]
     884 | void sss_nic_port_module_cable_unplug(struct sss_nic_dev *nic_dev, void *event_data)
         |      ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:884:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     884 | void sss_nic_port_module_cable_unplug(struct sss_nic_dev *nic_dev, void *event_data)
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:890:6: warning: no previous prototype for function 'sss_nic_port_module_link_err' [-Wmissing-prototypes]
     890 | void sss_nic_port_module_link_err(struct sss_nic_dev *nic_dev, void *event_data)
         |      ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:890:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     890 | void sss_nic_port_module_link_err(struct sss_nic_dev *nic_dev, void *event_data)
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:1029:22: warning: no previous prototype for function 'get_nic_uld_info' [-Wmissing-prototypes]
    1029 | struct sss_uld_info *get_nic_uld_info(void)
         |                      ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.c:1029:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
    1029 | struct sss_uld_info *get_nic_uld_info(void)
         | ^
         | static
   4 warnings generated.
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_main.o: warning: objtool: sss_nic_event()+0x1bd: can't find switch jump table
--
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_tx.c:710:9: sparse: sparse: restricted __be16 degrades to integer
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_tx.c: note: in included file:
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_io.h:103:37: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_io.h:103:37: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got unsigned long long [usertype] * @@
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_io.h:103:37: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_io.h:103:37: sparse:     got unsigned long long [usertype] *
--
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_rx.c: note: in included file:
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_io.h:103:37: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_io.h:103:37: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got unsigned long long [usertype] * @@
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_io.h:103:37: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_io.h:103:37: sparse:     got unsigned long long [usertype] *
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_io.h:103:37: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_io.h:103:37: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got unsigned long long [usertype] * @@
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_io.h:103:37: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_io.h:103:37: sparse:     got unsigned long long [usertype] *
--
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_rx_reset.c: note: in included file:
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_io.h:103:37: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_io.h:103:37: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got unsigned long long [usertype] * @@
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_io.h:103:37: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_io.h:103:37: sparse:     got unsigned long long [usertype] *
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_rx_reset.c:179:6: warning: no previous prototype for function 'sss_nic_rq_watchdog_handler' [-Wmissing-prototypes]
     179 | void sss_nic_rq_watchdog_handler(struct work_struct *work)
         |      ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_rx_reset.c:179:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     179 | void sss_nic_rq_watchdog_handler(struct work_struct *work)
         | ^
         | static
   1 warning generated.
--
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_rss.c:276:41: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __be32 [usertype] @@
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_rss.c:276:41: sparse:     expected unsigned int [usertype]
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_rss.c:276:41: sparse:     got restricted __be32 [usertype]
--
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:87:17: sparse: sparse: restricted __be32 degrades to integer
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:100:17: sparse: sparse: restricted __be32 degrades to integer
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:135:39: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] dport:16 @@     got restricted __be16 [usertype] pdst @@
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:135:39: sparse:     expected unsigned int [usertype] dport:16
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:135:39: sparse:     got restricted __be16 [usertype] pdst
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:138:39: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] sport:16 @@     got restricted __be16 [usertype] psrc @@
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:138:39: sparse:     expected unsigned int [usertype] sport:16
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:138:39: sparse:     got restricted __be16 [usertype] psrc
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:271:39: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] dport:16 @@     got restricted __be16 [usertype] pdst @@
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:271:39: sparse:     expected unsigned int [usertype] dport:16
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:271:39: sparse:     got restricted __be16 [usertype] pdst
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:274:39: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] sport:16 @@     got restricted __be16 [usertype] psrc @@
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:274:39: sparse:     expected unsigned int [usertype] sport:16
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:274:39: sparse:     got restricted __be16 [usertype] psrc
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:350:6: sparse: sparse: symbol 'sss_nic_flush_tcam_list' was not declared. Should it be static?
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:366:6: sparse: sparse: symbol 'sss_nic_flush_tcam_node_list' was not declared. Should it be static?
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:382:6: sparse: sparse: symbol 'sss_nic_flush_rx_flow_rule' was not declared. Should it be static?
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:350:6: warning: no previous prototype for function 'sss_nic_flush_tcam_list' [-Wmissing-prototypes]
     350 | void sss_nic_flush_tcam_list(struct sss_nic_tcam_info *tcam_info)
         |      ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:350:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     350 | void sss_nic_flush_tcam_list(struct sss_nic_tcam_info *tcam_info)
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:366:6: warning: no previous prototype for function 'sss_nic_flush_tcam_node_list' [-Wmissing-prototypes]
     366 | void sss_nic_flush_tcam_node_list(struct sss_nic_tcam_info *tcam_info)
         |      ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:366:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     366 | void sss_nic_flush_tcam_node_list(struct sss_nic_tcam_info *tcam_info)
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:382:6: warning: no previous prototype for function 'sss_nic_flush_rx_flow_rule' [-Wmissing-prototypes]
     382 | void sss_nic_flush_rx_flow_rule(struct sss_nic_rx_rule *rx_flow_rule)
         |      ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:382:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     382 | void sss_nic_flush_rx_flow_rule(struct sss_nic_rx_rule *rx_flow_rule)
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:397:6: warning: no previous prototype for function 'sss_nic_flush_tcam' [-Wmissing-prototypes]
     397 | void sss_nic_flush_tcam(struct sss_nic_dev *nic_dev)
         |      ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:397:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     397 | void sss_nic_flush_tcam(struct sss_nic_dev *nic_dev)
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:797:5: warning: no previous prototype for function 'sss_nic_ethtool_update_flow' [-Wmissing-prototypes]
     797 | int sss_nic_ethtool_update_flow(struct sss_nic_dev *nic_dev,
         |     ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:797:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     797 | int sss_nic_ethtool_update_flow(struct sss_nic_dev *nic_dev,
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:842:5: warning: no previous prototype for function 'sss_nic_ethtool_delete_flow' [-Wmissing-prototypes]
     842 | int sss_nic_ethtool_delete_flow(struct sss_nic_dev *nic_dev, u32 location)
         |     ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:842:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     842 | int sss_nic_ethtool_delete_flow(struct sss_nic_dev *nic_dev, u32 location)
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:864:5: warning: no previous prototype for function 'sss_nic_ethtool_get_flow' [-Wmissing-prototypes]
     864 | int sss_nic_ethtool_get_flow(const struct sss_nic_dev *nic_dev,
         |     ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:864:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     864 | int sss_nic_ethtool_get_flow(const struct sss_nic_dev *nic_dev,
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:887:5: warning: no previous prototype for function 'sss_nic_ethtool_get_all_flows' [-Wmissing-prototypes]
     887 | int sss_nic_ethtool_get_all_flows(const struct sss_nic_dev *nic_dev,
         |     ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:887:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     887 | int sss_nic_ethtool_get_all_flows(const struct sss_nic_dev *nic_dev,
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:905:6: warning: no previous prototype for function 'sss_nic_validate_channel_setting_in_ntuple' [-Wmissing-prototypes]
     905 | bool sss_nic_validate_channel_setting_in_ntuple(const struct sss_nic_dev *nic_dev, u32 q_num)
         |      ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ntuple.c:905:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     905 | bool sss_nic_validate_channel_setting_in_ntuple(const struct sss_nic_dev *nic_dev, u32 q_num)
         | ^
         | static
   9 warnings generated.
--
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_api.c:644:5: sparse: sparse: symbol 'sss_nic_finish_loop_test' was not declared. Should it be static?
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_api.c:644:5: warning: no previous prototype for function 'sss_nic_finish_loop_test' [-Wmissing-prototypes]
     644 | int sss_nic_finish_loop_test(struct sss_nic_dev *nic_dev,
         |     ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_ethtool_api.c:644:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     644 | int sss_nic_finish_loop_test(struct sss_nic_dev *nic_dev,
         | ^
         | static
   1 warning generated.
--
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_netdev_ops.c:297:5: sparse: sparse: symbol 'sss_nic_ndo_vlan_rx_add_vid' was not declared. Should it be static?
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_netdev_ops.c:318:5: sparse: sparse: symbol 'sss_nic_ndo_vlan_rx_kill_vid' was not declared. Should it be static?
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_netdev_ops.c:506:5: sparse: sparse: symbol 'sss_nic_ndo_set_vf_link_state' was not declared. Should it be static?
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_netdev_ops.c:297:5: warning: no previous prototype for function 'sss_nic_ndo_vlan_rx_add_vid' [-Wmissing-prototypes]
     297 | int sss_nic_ndo_vlan_rx_add_vid(struct net_device *netdev,
         |     ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_netdev_ops.c:297:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     297 | int sss_nic_ndo_vlan_rx_add_vid(struct net_device *netdev,
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_netdev_ops.c:318:5: warning: no previous prototype for function 'sss_nic_ndo_vlan_rx_kill_vid' [-Wmissing-prototypes]
     318 | int sss_nic_ndo_vlan_rx_kill_vid(struct net_device *netdev,
         |     ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_netdev_ops.c:318:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     318 | int sss_nic_ndo_vlan_rx_kill_vid(struct net_device *netdev,
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_netdev_ops.c:506:5: warning: no previous prototype for function 'sss_nic_ndo_set_vf_link_state' [-Wmissing-prototypes]
     506 | int sss_nic_ndo_set_vf_link_state(struct net_device *netdev, int vf_id, int link)
         |     ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_netdev_ops.c:506:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     506 | int sss_nic_ndo_set_vf_link_state(struct net_device *netdev, int vf_id, int link)
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_netdev_ops.c:787:6: warning: no previous prototype for function 'sss_nic_set_netdev_ops' [-Wmissing-prototypes]
     787 | void sss_nic_set_netdev_ops(struct sss_nic_dev *nic_dev)
         |      ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_netdev_ops.c:787:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     787 | void sss_nic_set_netdev_ops(struct sss_nic_dev *nic_dev)
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_netdev_ops.c:795:6: warning: no previous prototype for function 'sss_nic_is_netdev_ops_match' [-Wmissing-prototypes]
     795 | bool sss_nic_is_netdev_ops_match(const struct net_device *netdev)
         |      ^
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_netdev_ops.c:795:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     795 | bool sss_nic_is_netdev_ops_match(const struct net_device *netdev)
         | ^
         | static
   5 warnings generated.
--
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_cfg.c: note: in included file (through drivers/net/ethernet/3snic/sssnic/include/sss_hw.h):
>> drivers/net/ethernet/3snic/sssnic/include/hw/sss_hw_common.h:77:22: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __be32 [usertype] @@
   drivers/net/ethernet/3snic/sssnic/include/hw/sss_hw_common.h:77:22: sparse:     expected unsigned int [usertype]
   drivers/net/ethernet/3snic/sssnic/include/hw/sss_hw_common.h:77:22: sparse:     got restricted __be32 [usertype]
--
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_vf_cfg.c: note: in included file (through drivers/net/ethernet/3snic/sssnic/include/sss_hw.h):
>> drivers/net/ethernet/3snic/sssnic/include/hw/sss_hw_common.h:77:22: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __be32 [usertype] @@
   drivers/net/ethernet/3snic/sssnic/include/hw/sss_hw_common.h:77:22: sparse:     expected unsigned int [usertype]
   drivers/net/ethernet/3snic/sssnic/include/hw/sss_hw_common.h:77:22: sparse:     got restricted __be32 [usertype]
--
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_rss_cfg.c:109:31: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __be32 [usertype] @@
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_rss_cfg.c:109:31: sparse:     expected unsigned int [usertype]
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_rss_cfg.c:109:31: sparse:     got restricted __be32 [usertype]
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_rss_cfg.c:160:26: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] ctx @@     got restricted __be32 [usertype] @@
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_rss_cfg.c:160:26: sparse:     expected unsigned int [usertype] ctx
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_rss_cfg.c:160:26: sparse:     got restricted __be32 [usertype]
--
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_io.c:400:31: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_io.c:400:28: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected unsigned char [noderef] [usertype] __iomem *sq_db_addr @@     got unsigned char [usertype] * @@
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_io.c:400:28: sparse:     expected unsigned char [noderef] [usertype] __iomem *sq_db_addr
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_io.c:400:28: sparse:     got unsigned char [usertype] *
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_io.c:408:31: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_io.c:408:28: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected unsigned char [noderef] [usertype] __iomem *rq_db_addr @@     got unsigned char [usertype] * @@
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_io.c:408:28: sparse:     expected unsigned char [noderef] [usertype] __iomem *rq_db_addr
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_io.c:408:28: sparse:     got unsigned char [usertype] *
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_io.c: note: in included file (through drivers/net/ethernet/3snic/sssnic/include/sss_hw.h):
>> drivers/net/ethernet/3snic/sssnic/include/hw/sss_hw_common.h:77:22: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __be32 [usertype] @@
   drivers/net/ethernet/3snic/sssnic/include/hw/sss_hw_common.h:77:22: sparse:     expected unsigned int [usertype]
   drivers/net/ethernet/3snic/sssnic/include/hw/sss_hw_common.h:77:22: sparse:     got restricted __be32 [usertype]
>> drivers/net/ethernet/3snic/sssnic/include/hw/sss_hw_common.h:77:22: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __be32 [usertype] @@
   drivers/net/ethernet/3snic/sssnic/include/hw/sss_hw_common.h:77:22: sparse:     expected unsigned int [usertype]
   drivers/net/ethernet/3snic/sssnic/include/hw/sss_hw_common.h:77:22: sparse:     got restricted __be32 [usertype]
>> drivers/net/ethernet/3snic/sssnic/include/hw/sss_hw_common.h:77:22: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __be32 [usertype] @@
   drivers/net/ethernet/3snic/sssnic/include/hw/sss_hw_common.h:77:22: sparse:     expected unsigned int [usertype]
   drivers/net/ethernet/3snic/sssnic/include/hw/sss_hw_common.h:77:22: sparse:     got restricted __be32 [usertype]
>> drivers/net/ethernet/3snic/sssnic/include/hw/sss_hw_common.h:77:22: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] @@     got restricted __be32 [usertype] @@
   drivers/net/ethernet/3snic/sssnic/include/hw/sss_hw_common.h:77:22: sparse:     expected unsigned int [usertype]
   drivers/net/ethernet/3snic/sssnic/include/hw/sss_hw_common.h:77:22: sparse:     got restricted __be32 [usertype]
--
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_netdev_ops_api.c:689:33: sparse: sparse: cast to restricted __be32
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_netdev_ops_api.c:692:38: sparse: sparse: cast to restricted __be32
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_netdev_ops_api.c:728:37: sparse: sparse: restricted __be32 degrades to integer
   drivers/net/ethernet/3snic/sssnic/nic/sss_nic_netdev_ops_api.c:729:37: sparse: sparse: restricted __be32 degrades to integer
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_netdev_ops_api.c:741:37: sparse: sparse: cast to restricted __be16
>> drivers/net/ethernet/3snic/sssnic/nic/sss_nic_netdev_ops_api.c:741:37: sparse: sparse: cast to restricted __be16
--
>> drivers/net/ethernet/3snic/sssnic/nic/./tool/sss_tool_nic_qp_info.c:71:39: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/net/ethernet/3snic/sssnic/nic/./tool/sss_tool_nic_qp_info.c:88:24: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] hw_pi @@     got restricted __be16 [usertype] @@
   drivers/net/ethernet/3snic/sssnic/nic/./tool/sss_tool_nic_qp_info.c:88:24: sparse:     expected unsigned short [usertype] hw_pi
   drivers/net/ethernet/3snic/sssnic/nic/./tool/sss_tool_nic_qp_info.c:88:24: sparse:     got restricted __be16 [usertype]
   drivers/net/ethernet/3snic/sssnic/nic/./tool/sss_tool_nic_qp_info.c:137:5: sparse: sparse: symbol 'sss_tool_get_tx_info' was not declared. Should it be static?
   drivers/net/ethernet/3snic/sssnic/nic/./tool/sss_tool_nic_qp_info.c:163:5: sparse: sparse: symbol 'sss_tool_get_tx_wqe_info' was not declared. Should it be static?
   drivers/net/ethernet/3snic/sssnic/nic/./tool/sss_tool_nic_qp_info.c:182:5: sparse: sparse: symbol 'sss_tool_get_rx_info' was not declared. Should it be static?
   drivers/net/ethernet/3snic/sssnic/nic/./tool/sss_tool_nic_qp_info.c:223:5: sparse: sparse: symbol 'sss_tool_get_rx_wqe_info' was not declared. Should it be static?
   drivers/net/ethernet/3snic/sssnic/nic/./tool/sss_tool_nic_qp_info.c:242:5: sparse: sparse: symbol 'sss_tool_get_rx_cqe_info' was not declared. Should it be static?
   drivers/net/ethernet/3snic/sssnic/nic/./tool/sss_tool_nic_qp_info.c:280:5: sparse: sparse: symbol 'sss_tool_get_q_num' was not declared. Should it be static?
   drivers/net/ethernet/3snic/sssnic/nic/./tool/sss_tool_nic_qp_info.c:304:5: sparse: sparse: symbol 'sss_tool_get_inter_num' was not declared. Should it be static?
   drivers/net/ethernet/3snic/sssnic/nic/./tool/sss_tool_nic_qp_info.c:137:5: warning: no previous prototype for function 'sss_tool_get_tx_info' [-Wmissing-prototypes]
     137 | int sss_tool_get_tx_info(struct sss_nic_dev *nic_dev, const void *in_buf,
         |     ^
   drivers/net/ethernet/3snic/sssnic/nic/./tool/sss_tool_nic_qp_info.c:137:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     137 | int sss_tool_get_tx_info(struct sss_nic_dev *nic_dev, const void *in_buf,
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/nic/./tool/sss_tool_nic_qp_info.c:163:5: warning: no previous prototype for function 'sss_tool_get_tx_wqe_info' [-Wmissing-prototypes]
     163 | int sss_tool_get_tx_wqe_info(struct sss_nic_dev *nic_dev, const void *in_buf,
         |     ^
   drivers/net/ethernet/3snic/sssnic/nic/./tool/sss_tool_nic_qp_info.c:163:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     163 | int sss_tool_get_tx_wqe_info(struct sss_nic_dev *nic_dev, const void *in_buf,
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/nic/./tool/sss_tool_nic_qp_info.c:182:5: warning: no previous prototype for function 'sss_tool_get_rx_info' [-Wmissing-prototypes]
     182 | int sss_tool_get_rx_info(struct sss_nic_dev *nic_dev, const void *in_buf,
         |     ^
   drivers/net/ethernet/3snic/sssnic/nic/./tool/sss_tool_nic_qp_info.c:182:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     182 | int sss_tool_get_rx_info(struct sss_nic_dev *nic_dev, const void *in_buf,
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/nic/./tool/sss_tool_nic_qp_info.c:223:5: warning: no previous prototype for function 'sss_tool_get_rx_wqe_info' [-Wmissing-prototypes]
     223 | int sss_tool_get_rx_wqe_info(struct sss_nic_dev *nic_dev, const void *in_buf,
         |     ^
   drivers/net/ethernet/3snic/sssnic/nic/./tool/sss_tool_nic_qp_info.c:223:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     223 | int sss_tool_get_rx_wqe_info(struct sss_nic_dev *nic_dev, const void *in_buf,
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/nic/./tool/sss_tool_nic_qp_info.c:242:5: warning: no previous prototype for function 'sss_tool_get_rx_cqe_info' [-Wmissing-prototypes]
     242 | int sss_tool_get_rx_cqe_info(struct sss_nic_dev *nic_dev, const void *in_buf,
         |     ^
   drivers/net/ethernet/3snic/sssnic/nic/./tool/sss_tool_nic_qp_info.c:242:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     242 | int sss_tool_get_rx_cqe_info(struct sss_nic_dev *nic_dev, const void *in_buf,
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/nic/./tool/sss_tool_nic_qp_info.c:280:5: warning: no previous prototype for function 'sss_tool_get_q_num' [-Wmissing-prototypes]
     280 | int sss_tool_get_q_num(struct sss_nic_dev *nic_dev, const void *in_buf, u32 in_len,
         |     ^
   drivers/net/ethernet/3snic/sssnic/nic/./tool/sss_tool_nic_qp_info.c:280:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     280 | int sss_tool_get_q_num(struct sss_nic_dev *nic_dev, const void *in_buf, u32 in_len,
         | ^
         | static
   drivers/net/ethernet/3snic/sssnic/nic/./tool/sss_tool_nic_qp_info.c:304:5: warning: no previous prototype for function 'sss_tool_get_inter_num' [-Wmissing-prototypes]
     304 | int sss_tool_get_inter_num(struct sss_nic_dev *nic_dev, const void *in_buf,
         |     ^
   drivers/net/ethernet/3snic/sssnic/nic/./tool/sss_tool_nic_qp_info.c:304:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
     304 | int sss_tool_get_inter_num(struct sss_nic_dev *nic_dev, const void *in_buf,
         | ^
         | static
   7 warnings generated.
vim +/sss_attach_uld_driver +276 drivers/net/ethernet/3snic/sssnic/hw/sss_pci_probe.c
   275	
 > 276	int sss_attach_uld_driver(struct sss_pci_adapter *adapter,
   277				  enum sss_service_type type, const struct sss_uld_info *uld_info)
   278	{
   279		int ret = 0;
   280		void *uld = NULL;
   281		const char **name = sss_get_uld_names();
   282		struct pci_dev *pdev = adapter->pcidev;
   283	
   284		mutex_lock(&adapter->uld_attach_mutex);
   285	
   286		if (adapter->uld_dev[type]) {
   287			sdk_err(&pdev->dev, "Fail to attach pci dev, driver %s\n", name[type]);
   288			mutex_unlock(&adapter->uld_attach_mutex);
   289			return 0;
   290		}
   291	
   292		ret = uld_info->probe(&adapter->hal_dev, &uld, adapter->uld_dev_name[type]);
   293		if (ret != 0) {
   294			sdk_err(&pdev->dev, "Fail to probe for driver %s\n", name[type]);
   295			mutex_unlock(&adapter->uld_attach_mutex);
   296			return ret;
   297		}
   298	
   299		adapter->uld_dev[type] = uld;
   300		set_bit(type, &adapter->uld_attach_state);
   301		mutex_unlock(&adapter->uld_attach_mutex);
   302	
   303		sdk_info(&pdev->dev, "Success to attach %s driver\n", name[type]);
   304	
   305		return 0;
   306	}
   307	
-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            0