[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202311222244.3Znlb164-lkp@intel.com>
Date: Thu, 23 Nov 2023 16:38:01 +0800
From: kernel test robot <yujie.liu@...el.com>
To: Sherry Yang <sherryy@...roid.com>
CC: <oe-kbuild-all@...ts.linux.dev>, <linux-kernel@...r.kernel.org>
Subject: drivers/android/binder_alloc.c:866: warning: No description found
for parameter 'lru'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c2d5304e6c648ebcf653bace7e51e0e6742e46c8
commit: f2517eb76f1f2f7f89761f9db2b202e89931738c android: binder: Add global lru shrinker to binder
config: x86_64-randconfig-003-20231122 (https://download.01.org/0day-ci/archive/20231122/202311222244.3Znlb164-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231122/202311222244.3Znlb164-lkp@intel.com/reproduce)
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 <yujie.liu@...el.com>
| Closes: https://lore.kernel.org/r/202311222244.3Znlb164-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/android/binder_alloc.c:866: warning: No description found for parameter 'lru'
vim +/lru +866 drivers/android/binder_alloc.c
0c972a05cde66e Todd Kjos 2017-06-29 852
f2517eb76f1f2f Sherry Yang 2017-08-23 853 /**
f2517eb76f1f2f Sherry Yang 2017-08-23 854 * binder_alloc_free_page() - shrinker callback to free pages
f2517eb76f1f2f Sherry Yang 2017-08-23 855 * @item: item to free
f2517eb76f1f2f Sherry Yang 2017-08-23 856 * @lock: lock protecting the item
f2517eb76f1f2f Sherry Yang 2017-08-23 857 * @cb_arg: callback argument
f2517eb76f1f2f Sherry Yang 2017-08-23 858 *
f2517eb76f1f2f Sherry Yang 2017-08-23 859 * Called from list_lru_walk() in binder_shrink_scan() to free
f2517eb76f1f2f Sherry Yang 2017-08-23 860 * up pages when the system is under memory pressure.
f2517eb76f1f2f Sherry Yang 2017-08-23 861 */
f2517eb76f1f2f Sherry Yang 2017-08-23 862 enum lru_status binder_alloc_free_page(struct list_head *item,
f2517eb76f1f2f Sherry Yang 2017-08-23 863 struct list_lru_one *lru,
f2517eb76f1f2f Sherry Yang 2017-08-23 864 spinlock_t *lock,
f2517eb76f1f2f Sherry Yang 2017-08-23 865 void *cb_arg)
f2517eb76f1f2f Sherry Yang 2017-08-23 @866 {
f2517eb76f1f2f Sherry Yang 2017-08-23 867 struct mm_struct *mm = NULL;
f2517eb76f1f2f Sherry Yang 2017-08-23 868 struct binder_lru_page *page = container_of(item,
f2517eb76f1f2f Sherry Yang 2017-08-23 869 struct binder_lru_page,
f2517eb76f1f2f Sherry Yang 2017-08-23 870 lru);
f2517eb76f1f2f Sherry Yang 2017-08-23 871 struct binder_alloc *alloc;
f2517eb76f1f2f Sherry Yang 2017-08-23 872 uintptr_t page_addr;
f2517eb76f1f2f Sherry Yang 2017-08-23 873 size_t index;
f2517eb76f1f2f Sherry Yang 2017-08-23 874
f2517eb76f1f2f Sherry Yang 2017-08-23 875 alloc = page->alloc;
f2517eb76f1f2f Sherry Yang 2017-08-23 876 if (!mutex_trylock(&alloc->mutex))
f2517eb76f1f2f Sherry Yang 2017-08-23 877 goto err_get_alloc_mutex_failed;
f2517eb76f1f2f Sherry Yang 2017-08-23 878
f2517eb76f1f2f Sherry Yang 2017-08-23 879 if (!page->page_ptr)
f2517eb76f1f2f Sherry Yang 2017-08-23 880 goto err_page_already_freed;
f2517eb76f1f2f Sherry Yang 2017-08-23 881
f2517eb76f1f2f Sherry Yang 2017-08-23 882 index = page - alloc->pages;
f2517eb76f1f2f Sherry Yang 2017-08-23 883 page_addr = (uintptr_t)alloc->buffer + index * PAGE_SIZE;
f2517eb76f1f2f Sherry Yang 2017-08-23 884 if (alloc->vma) {
f2517eb76f1f2f Sherry Yang 2017-08-23 885 mm = get_task_mm(alloc->tsk);
f2517eb76f1f2f Sherry Yang 2017-08-23 886 if (!mm)
f2517eb76f1f2f Sherry Yang 2017-08-23 887 goto err_get_task_mm_failed;
f2517eb76f1f2f Sherry Yang 2017-08-23 888 if (!down_write_trylock(&mm->mmap_sem))
f2517eb76f1f2f Sherry Yang 2017-08-23 889 goto err_down_write_mmap_sem_failed;
f2517eb76f1f2f Sherry Yang 2017-08-23 890
f2517eb76f1f2f Sherry Yang 2017-08-23 891 zap_page_range(alloc->vma,
f2517eb76f1f2f Sherry Yang 2017-08-23 892 page_addr + alloc->user_buffer_offset,
f2517eb76f1f2f Sherry Yang 2017-08-23 893 PAGE_SIZE);
f2517eb76f1f2f Sherry Yang 2017-08-23 894
f2517eb76f1f2f Sherry Yang 2017-08-23 895 up_write(&mm->mmap_sem);
f2517eb76f1f2f Sherry Yang 2017-08-23 896 mmput(mm);
f2517eb76f1f2f Sherry Yang 2017-08-23 897 }
f2517eb76f1f2f Sherry Yang 2017-08-23 898
f2517eb76f1f2f Sherry Yang 2017-08-23 899 unmap_kernel_range(page_addr, PAGE_SIZE);
f2517eb76f1f2f Sherry Yang 2017-08-23 900 __free_page(page->page_ptr);
f2517eb76f1f2f Sherry Yang 2017-08-23 901 page->page_ptr = NULL;
f2517eb76f1f2f Sherry Yang 2017-08-23 902
f2517eb76f1f2f Sherry Yang 2017-08-23 903 list_lru_isolate(lru, item);
f2517eb76f1f2f Sherry Yang 2017-08-23 904
f2517eb76f1f2f Sherry Yang 2017-08-23 905 mutex_unlock(&alloc->mutex);
f2517eb76f1f2f Sherry Yang 2017-08-23 906 return LRU_REMOVED;
f2517eb76f1f2f Sherry Yang 2017-08-23 907
f2517eb76f1f2f Sherry Yang 2017-08-23 908 err_down_write_mmap_sem_failed:
f2517eb76f1f2f Sherry Yang 2017-08-23 909 mmput(mm);
f2517eb76f1f2f Sherry Yang 2017-08-23 910 err_get_task_mm_failed:
f2517eb76f1f2f Sherry Yang 2017-08-23 911 err_page_already_freed:
f2517eb76f1f2f Sherry Yang 2017-08-23 912 mutex_unlock(&alloc->mutex);
f2517eb76f1f2f Sherry Yang 2017-08-23 913 err_get_alloc_mutex_failed:
f2517eb76f1f2f Sherry Yang 2017-08-23 914 return LRU_SKIP;
f2517eb76f1f2f Sherry Yang 2017-08-23 915 }
f2517eb76f1f2f Sherry Yang 2017-08-23 916
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists