From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org
Subject: [rcu:willy-maple 175/202] mm/ksm.c:979 unmerge_and_remove_all_rmap_items() error: uninitialized symbol 'mm'.
Date: Thu, 04 Feb 2021 10:17:24 +0300 [thread overview]
Message-ID: <20210204071724.GD2696@kadam> (raw)
[-- Attachment #1: Type: text/plain, Size: 5459 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git willy-maple
head: 7e346d2845b4bd77663394f39fa70456e0084c86
commit: 3fd77bfa4f25fa2e3caec024c69168bf6a0ca8d7 [175/202] mm/ksm: Use maple tree iterators instead of vma linked list
config: x86_64-randconfig-m001-20210202 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
mm/ksm.c:979 unmerge_and_remove_all_rmap_items() error: uninitialized symbol 'mm'.
vim +/mm +979 mm/ksm.c
d952b79136a6c3 Hugh Dickins 2009-09-21 965 static int unmerge_and_remove_all_rmap_items(void)
31dbd01f314364 Izik Eidus 2009-09-21 966 {
31dbd01f314364 Izik Eidus 2009-09-21 967 struct mm_slot *mm_slot;
31dbd01f314364 Izik Eidus 2009-09-21 968 struct mm_struct *mm;
31dbd01f314364 Izik Eidus 2009-09-21 969 struct vm_area_struct *vma;
d952b79136a6c3 Hugh Dickins 2009-09-21 970 int err = 0;
31dbd01f314364 Izik Eidus 2009-09-21 971
d952b79136a6c3 Hugh Dickins 2009-09-21 972 spin_lock(&ksm_mmlist_lock);
9ba6929480088a Hugh Dickins 2009-09-21 973 ksm_scan.mm_slot = list_entry(ksm_mm_head.mm_list.next,
d952b79136a6c3 Hugh Dickins 2009-09-21 974 struct mm_slot, mm_list);
d952b79136a6c3 Hugh Dickins 2009-09-21 975 spin_unlock(&ksm_mmlist_lock);
d952b79136a6c3 Hugh Dickins 2009-09-21 976
9ba6929480088a Hugh Dickins 2009-09-21 977 for (mm_slot = ksm_scan.mm_slot;
3fd77bfa4f25fa Liam R. Howlett 2021-01-04 978 mm_slot != &ksm_mm_head; mm_slot = ksm_scan.mm_slot, mm = mm_slot->mm) {
3fd77bfa4f25fa Liam R. Howlett 2021-01-04 @979 MA_STATE(mas, &mm->mm_mt, 0, 0);
^^
Not initialized on the first iteration through the loop?
3fd77bfa4f25fa Liam R. Howlett 2021-01-04 980
d8ed45c5dcd455 Michel Lespinasse 2020-06-08 981 mmap_read_lock(mm);
3fd77bfa4f25fa Liam R. Howlett 2021-01-04 982 mas_set(&mas, 0);
3fd77bfa4f25fa Liam R. Howlett 2021-01-04 983 mas_for_each(&mas, vma, ULONG_MAX) {
9ba6929480088a Hugh Dickins 2009-09-21 984 if (ksm_test_exit(mm))
9ba6929480088a Hugh Dickins 2009-09-21 985 break;
31dbd01f314364 Izik Eidus 2009-09-21 986 if (!(vma->vm_flags & VM_MERGEABLE) || !vma->anon_vma)
31dbd01f314364 Izik Eidus 2009-09-21 987 continue;
d952b79136a6c3 Hugh Dickins 2009-09-21 988 err = unmerge_ksm_pages(vma,
d952b79136a6c3 Hugh Dickins 2009-09-21 989 vma->vm_start, vma->vm_end);
9ba6929480088a Hugh Dickins 2009-09-21 990 if (err)
9ba6929480088a Hugh Dickins 2009-09-21 991 goto error;
31dbd01f314364 Izik Eidus 2009-09-21 992 }
9ba6929480088a Hugh Dickins 2009-09-21 993
6514d511dbe5a7 Hugh Dickins 2009-12-14 994 remove_trailing_rmap_items(mm_slot, &mm_slot->rmap_list);
d8ed45c5dcd455 Michel Lespinasse 2020-06-08 995 mmap_read_unlock(mm);
d952b79136a6c3 Hugh Dickins 2009-09-21 996
d952b79136a6c3 Hugh Dickins 2009-09-21 997 spin_lock(&ksm_mmlist_lock);
9ba6929480088a Hugh Dickins 2009-09-21 998 ksm_scan.mm_slot = list_entry(mm_slot->mm_list.next,
d952b79136a6c3 Hugh Dickins 2009-09-21 999 struct mm_slot, mm_list);
9ba6929480088a Hugh Dickins 2009-09-21 1000 if (ksm_test_exit(mm)) {
4ca3a69bcb6875 Sasha Levin 2013-02-22 1001 hash_del(&mm_slot->link);
9ba6929480088a Hugh Dickins 2009-09-21 1002 list_del(&mm_slot->mm_list);
9ba6929480088a Hugh Dickins 2009-09-21 1003 spin_unlock(&ksm_mmlist_lock);
9ba6929480088a Hugh Dickins 2009-09-21 1004
9ba6929480088a Hugh Dickins 2009-09-21 1005 free_mm_slot(mm_slot);
9ba6929480088a Hugh Dickins 2009-09-21 1006 clear_bit(MMF_VM_MERGEABLE, &mm->flags);
9ba6929480088a Hugh Dickins 2009-09-21 1007 mmdrop(mm);
7496fea9a6bf64 Zhou Chengming 2016-05-12 1008 } else
d952b79136a6c3 Hugh Dickins 2009-09-21 1009 spin_unlock(&ksm_mmlist_lock);
31dbd01f314364 Izik Eidus 2009-09-21 1010 }
31dbd01f314364 Izik Eidus 2009-09-21 1011
cbf86cfe04a664 Hugh Dickins 2013-02-22 1012 /* Clean up stable nodes, but don't worry if some are still busy */
cbf86cfe04a664 Hugh Dickins 2013-02-22 1013 remove_all_stable_nodes();
d952b79136a6c3 Hugh Dickins 2009-09-21 1014 ksm_scan.seqnr = 0;
9ba6929480088a Hugh Dickins 2009-09-21 1015 return 0;
9ba6929480088a Hugh Dickins 2009-09-21 1016
9ba6929480088a Hugh Dickins 2009-09-21 1017 error:
d8ed45c5dcd455 Michel Lespinasse 2020-06-08 1018 mmap_read_unlock(mm);
31dbd01f314364 Izik Eidus 2009-09-21 1019 spin_lock(&ksm_mmlist_lock);
31dbd01f314364 Izik Eidus 2009-09-21 1020 ksm_scan.mm_slot = &ksm_mm_head;
31dbd01f314364 Izik Eidus 2009-09-21 1021 spin_unlock(&ksm_mmlist_lock);
d952b79136a6c3 Hugh Dickins 2009-09-21 1022 return err;
31dbd01f314364 Izik Eidus 2009-09-21 1023 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 34023 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild-all@lists.01.org
Subject: [rcu:willy-maple 175/202] mm/ksm.c:979 unmerge_and_remove_all_rmap_items() error: uninitialized symbol 'mm'.
Date: Thu, 04 Feb 2021 10:17:24 +0300 [thread overview]
Message-ID: <20210204071724.GD2696@kadam> (raw)
[-- Attachment #1: Type: text/plain, Size: 5459 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git willy-maple
head: 7e346d2845b4bd77663394f39fa70456e0084c86
commit: 3fd77bfa4f25fa2e3caec024c69168bf6a0ca8d7 [175/202] mm/ksm: Use maple tree iterators instead of vma linked list
config: x86_64-randconfig-m001-20210202 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
mm/ksm.c:979 unmerge_and_remove_all_rmap_items() error: uninitialized symbol 'mm'.
vim +/mm +979 mm/ksm.c
d952b79136a6c3 Hugh Dickins 2009-09-21 965 static int unmerge_and_remove_all_rmap_items(void)
31dbd01f314364 Izik Eidus 2009-09-21 966 {
31dbd01f314364 Izik Eidus 2009-09-21 967 struct mm_slot *mm_slot;
31dbd01f314364 Izik Eidus 2009-09-21 968 struct mm_struct *mm;
31dbd01f314364 Izik Eidus 2009-09-21 969 struct vm_area_struct *vma;
d952b79136a6c3 Hugh Dickins 2009-09-21 970 int err = 0;
31dbd01f314364 Izik Eidus 2009-09-21 971
d952b79136a6c3 Hugh Dickins 2009-09-21 972 spin_lock(&ksm_mmlist_lock);
9ba6929480088a Hugh Dickins 2009-09-21 973 ksm_scan.mm_slot = list_entry(ksm_mm_head.mm_list.next,
d952b79136a6c3 Hugh Dickins 2009-09-21 974 struct mm_slot, mm_list);
d952b79136a6c3 Hugh Dickins 2009-09-21 975 spin_unlock(&ksm_mmlist_lock);
d952b79136a6c3 Hugh Dickins 2009-09-21 976
9ba6929480088a Hugh Dickins 2009-09-21 977 for (mm_slot = ksm_scan.mm_slot;
3fd77bfa4f25fa Liam R. Howlett 2021-01-04 978 mm_slot != &ksm_mm_head; mm_slot = ksm_scan.mm_slot, mm = mm_slot->mm) {
3fd77bfa4f25fa Liam R. Howlett 2021-01-04 @979 MA_STATE(mas, &mm->mm_mt, 0, 0);
^^
Not initialized on the first iteration through the loop?
3fd77bfa4f25fa Liam R. Howlett 2021-01-04 980
d8ed45c5dcd455 Michel Lespinasse 2020-06-08 981 mmap_read_lock(mm);
3fd77bfa4f25fa Liam R. Howlett 2021-01-04 982 mas_set(&mas, 0);
3fd77bfa4f25fa Liam R. Howlett 2021-01-04 983 mas_for_each(&mas, vma, ULONG_MAX) {
9ba6929480088a Hugh Dickins 2009-09-21 984 if (ksm_test_exit(mm))
9ba6929480088a Hugh Dickins 2009-09-21 985 break;
31dbd01f314364 Izik Eidus 2009-09-21 986 if (!(vma->vm_flags & VM_MERGEABLE) || !vma->anon_vma)
31dbd01f314364 Izik Eidus 2009-09-21 987 continue;
d952b79136a6c3 Hugh Dickins 2009-09-21 988 err = unmerge_ksm_pages(vma,
d952b79136a6c3 Hugh Dickins 2009-09-21 989 vma->vm_start, vma->vm_end);
9ba6929480088a Hugh Dickins 2009-09-21 990 if (err)
9ba6929480088a Hugh Dickins 2009-09-21 991 goto error;
31dbd01f314364 Izik Eidus 2009-09-21 992 }
9ba6929480088a Hugh Dickins 2009-09-21 993
6514d511dbe5a7 Hugh Dickins 2009-12-14 994 remove_trailing_rmap_items(mm_slot, &mm_slot->rmap_list);
d8ed45c5dcd455 Michel Lespinasse 2020-06-08 995 mmap_read_unlock(mm);
d952b79136a6c3 Hugh Dickins 2009-09-21 996
d952b79136a6c3 Hugh Dickins 2009-09-21 997 spin_lock(&ksm_mmlist_lock);
9ba6929480088a Hugh Dickins 2009-09-21 998 ksm_scan.mm_slot = list_entry(mm_slot->mm_list.next,
d952b79136a6c3 Hugh Dickins 2009-09-21 999 struct mm_slot, mm_list);
9ba6929480088a Hugh Dickins 2009-09-21 1000 if (ksm_test_exit(mm)) {
4ca3a69bcb6875 Sasha Levin 2013-02-22 1001 hash_del(&mm_slot->link);
9ba6929480088a Hugh Dickins 2009-09-21 1002 list_del(&mm_slot->mm_list);
9ba6929480088a Hugh Dickins 2009-09-21 1003 spin_unlock(&ksm_mmlist_lock);
9ba6929480088a Hugh Dickins 2009-09-21 1004
9ba6929480088a Hugh Dickins 2009-09-21 1005 free_mm_slot(mm_slot);
9ba6929480088a Hugh Dickins 2009-09-21 1006 clear_bit(MMF_VM_MERGEABLE, &mm->flags);
9ba6929480088a Hugh Dickins 2009-09-21 1007 mmdrop(mm);
7496fea9a6bf64 Zhou Chengming 2016-05-12 1008 } else
d952b79136a6c3 Hugh Dickins 2009-09-21 1009 spin_unlock(&ksm_mmlist_lock);
31dbd01f314364 Izik Eidus 2009-09-21 1010 }
31dbd01f314364 Izik Eidus 2009-09-21 1011
cbf86cfe04a664 Hugh Dickins 2013-02-22 1012 /* Clean up stable nodes, but don't worry if some are still busy */
cbf86cfe04a664 Hugh Dickins 2013-02-22 1013 remove_all_stable_nodes();
d952b79136a6c3 Hugh Dickins 2009-09-21 1014 ksm_scan.seqnr = 0;
9ba6929480088a Hugh Dickins 2009-09-21 1015 return 0;
9ba6929480088a Hugh Dickins 2009-09-21 1016
9ba6929480088a Hugh Dickins 2009-09-21 1017 error:
d8ed45c5dcd455 Michel Lespinasse 2020-06-08 1018 mmap_read_unlock(mm);
31dbd01f314364 Izik Eidus 2009-09-21 1019 spin_lock(&ksm_mmlist_lock);
31dbd01f314364 Izik Eidus 2009-09-21 1020 ksm_scan.mm_slot = &ksm_mm_head;
31dbd01f314364 Izik Eidus 2009-09-21 1021 spin_unlock(&ksm_mmlist_lock);
d952b79136a6c3 Hugh Dickins 2009-09-21 1022 return err;
31dbd01f314364 Izik Eidus 2009-09-21 1023 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 34023 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, "Liam R. Howlett" <Liam.Howlett@oracle.com>
Cc: lkp@intel.com, kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [rcu:willy-maple 175/202] mm/ksm.c:979 unmerge_and_remove_all_rmap_items() error: uninitialized symbol 'mm'.
Date: Thu, 4 Feb 2021 10:17:24 +0300 [thread overview]
Message-ID: <20210204071724.GD2696@kadam> (raw)
[-- Attachment #1: Type: text/plain, Size: 5376 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git willy-maple
head: 7e346d2845b4bd77663394f39fa70456e0084c86
commit: 3fd77bfa4f25fa2e3caec024c69168bf6a0ca8d7 [175/202] mm/ksm: Use maple tree iterators instead of vma linked list
config: x86_64-randconfig-m001-20210202 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
mm/ksm.c:979 unmerge_and_remove_all_rmap_items() error: uninitialized symbol 'mm'.
vim +/mm +979 mm/ksm.c
d952b79136a6c3 Hugh Dickins 2009-09-21 965 static int unmerge_and_remove_all_rmap_items(void)
31dbd01f314364 Izik Eidus 2009-09-21 966 {
31dbd01f314364 Izik Eidus 2009-09-21 967 struct mm_slot *mm_slot;
31dbd01f314364 Izik Eidus 2009-09-21 968 struct mm_struct *mm;
31dbd01f314364 Izik Eidus 2009-09-21 969 struct vm_area_struct *vma;
d952b79136a6c3 Hugh Dickins 2009-09-21 970 int err = 0;
31dbd01f314364 Izik Eidus 2009-09-21 971
d952b79136a6c3 Hugh Dickins 2009-09-21 972 spin_lock(&ksm_mmlist_lock);
9ba6929480088a Hugh Dickins 2009-09-21 973 ksm_scan.mm_slot = list_entry(ksm_mm_head.mm_list.next,
d952b79136a6c3 Hugh Dickins 2009-09-21 974 struct mm_slot, mm_list);
d952b79136a6c3 Hugh Dickins 2009-09-21 975 spin_unlock(&ksm_mmlist_lock);
d952b79136a6c3 Hugh Dickins 2009-09-21 976
9ba6929480088a Hugh Dickins 2009-09-21 977 for (mm_slot = ksm_scan.mm_slot;
3fd77bfa4f25fa Liam R. Howlett 2021-01-04 978 mm_slot != &ksm_mm_head; mm_slot = ksm_scan.mm_slot, mm = mm_slot->mm) {
3fd77bfa4f25fa Liam R. Howlett 2021-01-04 @979 MA_STATE(mas, &mm->mm_mt, 0, 0);
^^
Not initialized on the first iteration through the loop?
3fd77bfa4f25fa Liam R. Howlett 2021-01-04 980
d8ed45c5dcd455 Michel Lespinasse 2020-06-08 981 mmap_read_lock(mm);
3fd77bfa4f25fa Liam R. Howlett 2021-01-04 982 mas_set(&mas, 0);
3fd77bfa4f25fa Liam R. Howlett 2021-01-04 983 mas_for_each(&mas, vma, ULONG_MAX) {
9ba6929480088a Hugh Dickins 2009-09-21 984 if (ksm_test_exit(mm))
9ba6929480088a Hugh Dickins 2009-09-21 985 break;
31dbd01f314364 Izik Eidus 2009-09-21 986 if (!(vma->vm_flags & VM_MERGEABLE) || !vma->anon_vma)
31dbd01f314364 Izik Eidus 2009-09-21 987 continue;
d952b79136a6c3 Hugh Dickins 2009-09-21 988 err = unmerge_ksm_pages(vma,
d952b79136a6c3 Hugh Dickins 2009-09-21 989 vma->vm_start, vma->vm_end);
9ba6929480088a Hugh Dickins 2009-09-21 990 if (err)
9ba6929480088a Hugh Dickins 2009-09-21 991 goto error;
31dbd01f314364 Izik Eidus 2009-09-21 992 }
9ba6929480088a Hugh Dickins 2009-09-21 993
6514d511dbe5a7 Hugh Dickins 2009-12-14 994 remove_trailing_rmap_items(mm_slot, &mm_slot->rmap_list);
d8ed45c5dcd455 Michel Lespinasse 2020-06-08 995 mmap_read_unlock(mm);
d952b79136a6c3 Hugh Dickins 2009-09-21 996
d952b79136a6c3 Hugh Dickins 2009-09-21 997 spin_lock(&ksm_mmlist_lock);
9ba6929480088a Hugh Dickins 2009-09-21 998 ksm_scan.mm_slot = list_entry(mm_slot->mm_list.next,
d952b79136a6c3 Hugh Dickins 2009-09-21 999 struct mm_slot, mm_list);
9ba6929480088a Hugh Dickins 2009-09-21 1000 if (ksm_test_exit(mm)) {
4ca3a69bcb6875 Sasha Levin 2013-02-22 1001 hash_del(&mm_slot->link);
9ba6929480088a Hugh Dickins 2009-09-21 1002 list_del(&mm_slot->mm_list);
9ba6929480088a Hugh Dickins 2009-09-21 1003 spin_unlock(&ksm_mmlist_lock);
9ba6929480088a Hugh Dickins 2009-09-21 1004
9ba6929480088a Hugh Dickins 2009-09-21 1005 free_mm_slot(mm_slot);
9ba6929480088a Hugh Dickins 2009-09-21 1006 clear_bit(MMF_VM_MERGEABLE, &mm->flags);
9ba6929480088a Hugh Dickins 2009-09-21 1007 mmdrop(mm);
7496fea9a6bf64 Zhou Chengming 2016-05-12 1008 } else
d952b79136a6c3 Hugh Dickins 2009-09-21 1009 spin_unlock(&ksm_mmlist_lock);
31dbd01f314364 Izik Eidus 2009-09-21 1010 }
31dbd01f314364 Izik Eidus 2009-09-21 1011
cbf86cfe04a664 Hugh Dickins 2013-02-22 1012 /* Clean up stable nodes, but don't worry if some are still busy */
cbf86cfe04a664 Hugh Dickins 2013-02-22 1013 remove_all_stable_nodes();
d952b79136a6c3 Hugh Dickins 2009-09-21 1014 ksm_scan.seqnr = 0;
9ba6929480088a Hugh Dickins 2009-09-21 1015 return 0;
9ba6929480088a Hugh Dickins 2009-09-21 1016
9ba6929480088a Hugh Dickins 2009-09-21 1017 error:
d8ed45c5dcd455 Michel Lespinasse 2020-06-08 1018 mmap_read_unlock(mm);
31dbd01f314364 Izik Eidus 2009-09-21 1019 spin_lock(&ksm_mmlist_lock);
31dbd01f314364 Izik Eidus 2009-09-21 1020 ksm_scan.mm_slot = &ksm_mm_head;
31dbd01f314364 Izik Eidus 2009-09-21 1021 spin_unlock(&ksm_mmlist_lock);
d952b79136a6c3 Hugh Dickins 2009-09-21 1022 return err;
31dbd01f314364 Izik Eidus 2009-09-21 1023 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34023 bytes --]
next reply other threads:[~2021-02-04 7:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-04 7:17 Dan Carpenter [this message]
2021-02-04 7:17 ` [rcu:willy-maple 175/202] mm/ksm.c:979 unmerge_and_remove_all_rmap_items() error: uninitialized symbol 'mm' Dan Carpenter
2021-02-04 7:17 ` Dan Carpenter
-- strict thread matches above, loose matches on Subject: below --
2021-02-04 6:05 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=20210204071724.GD2696@kadam \
--to=dan.carpenter@oracle.com \
--cc=kbuild@lists.01.org \
/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.