From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com
Subject: drivers/android/binder_alloc.c:866: warning: No description found for parameter 'lru'
Date: Thu, 23 Nov 2023 00:27:37 +0800 [thread overview]
Message-ID: <202311222244.3Znlb164-lkp@intel.com> (raw)
::::::
:::::: Manual check reason: "Committer is Greg Kroah-Hartman, remote is linus!"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Sherry Yang <sherryy@android.com>
CC: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
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
date: 6 years ago
:::::: branch date: 19 hours ago
:::::: commit date: 6 years ago
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 <lkp@intel.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
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <yujie.liu@intel.com>
To: Sherry Yang <sherryy@android.com>
Cc: <oe-kbuild-all@lists.linux.dev>, <linux-kernel@vger.kernel.org>
Subject: drivers/android/binder_alloc.c:866: warning: No description found for parameter 'lru'
Date: Thu, 23 Nov 2023 16:38:01 +0800 [thread overview]
Message-ID: <202311222244.3Znlb164-lkp@intel.com> (raw)
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@intel.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
next reply other threads:[~2023-11-22 16:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-22 16:27 kernel test robot [this message]
2023-11-23 8:38 ` drivers/android/binder_alloc.c:866: warning: No description found for parameter 'lru' kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202311222244.3Znlb164-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.