From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [luto:sched/lazymm 8/14] fs/exec.c:1012 exec_mmap() error: uninitialized symbol 'active_mm'.
Date: Mon, 05 Jul 2021 19:48:45 +0800 [thread overview]
Message-ID: <202107051930.DodavemL-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5701 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Andy Lutomirski <luto@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git sched/lazymm
head: 755ebd64bdde9503ba31bdcda9bb7cc5fe8b73b4
commit: ed4e648f7e1f8c6251b883ff42675ff291ee68dc [8/14] sched, exec: Move the activate_mm() call sequence into sched/core.c
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: x86_64-randconfig-m001-20210705 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 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>
New smatch warnings:
fs/exec.c:1012 exec_mmap() error: uninitialized symbol 'active_mm'.
Old smatch warnings:
fs/exec.c:130 __do_sys_uselib() warn: passing zero to 'PTR_ERR'
fs/exec.c:130 __do_sys_uselib() warn: passing zero to 'PTR_ERR'
fs/exec.c:1018 exec_mmap() error: uninitialized symbol 'active_mm'.
fs/exec.c:1667 remove_arg_zero() error: testing array offset 'offset' after use.
vim +/active_mm +1012 fs/exec.c
3dc20cb282ec03 Al Viro 2013-04-13 966
eea9673250db4e Eric W. Biederman 2020-03-25 967 /*
eea9673250db4e Eric W. Biederman 2020-03-25 968 * Maps the mm_struct mm into the current task struct.
f7cfd871ae0c50 Eric W. Biederman 2020-12-03 969 * On success, this function returns with exec_update_lock
f7cfd871ae0c50 Eric W. Biederman 2020-12-03 970 * held for writing.
eea9673250db4e Eric W. Biederman 2020-03-25 971 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 972 static int exec_mmap(struct mm_struct *mm)
^1da177e4c3f41 Linus Torvalds 2005-04-16 973 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 974 struct task_struct *tsk;
^1da177e4c3f41 Linus Torvalds 2005-04-16 975 struct mm_struct *old_mm, *active_mm;
eea9673250db4e Eric W. Biederman 2020-03-25 976 int ret;
^1da177e4c3f41 Linus Torvalds 2005-04-16 977
^1da177e4c3f41 Linus Torvalds 2005-04-16 978 /* Notify parent that we're no longer interested in the old VM */
^1da177e4c3f41 Linus Torvalds 2005-04-16 979 tsk = current;
^1da177e4c3f41 Linus Torvalds 2005-04-16 980 old_mm = current->mm;
4610ba7ad877fa Thomas Gleixner 2019-11-06 981 exec_mm_release(tsk, old_mm);
a28bf136e651e1 Eric W. Biederman 2020-03-30 982 if (old_mm)
a28bf136e651e1 Eric W. Biederman 2020-03-30 983 sync_mm_rss(old_mm);
^1da177e4c3f41 Linus Torvalds 2005-04-16 984
f7cfd871ae0c50 Eric W. Biederman 2020-12-03 985 ret = down_write_killable(&tsk->signal->exec_update_lock);
eea9673250db4e Eric W. Biederman 2020-03-25 986 if (ret)
eea9673250db4e Eric W. Biederman 2020-03-25 987 return ret;
eea9673250db4e Eric W. Biederman 2020-03-25 988
^1da177e4c3f41 Linus Torvalds 2005-04-16 989 if (old_mm) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 990 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 991 * Make sure that if there is a core dump in progress
^1da177e4c3f41 Linus Torvalds 2005-04-16 992 * for the old mm, we get out and die instead of going
c1e8d7c6a7a682 Michel Lespinasse 2020-06-08 993 * through with the exec. We must hold mmap_lock around
999d9fc1670bc0 Oleg Nesterov 2008-07-25 994 * checking core_state and changing tsk->mm.
^1da177e4c3f41 Linus Torvalds 2005-04-16 995 */
d8ed45c5dcd455 Michel Lespinasse 2020-06-08 996 mmap_read_lock(old_mm);
999d9fc1670bc0 Oleg Nesterov 2008-07-25 997 if (unlikely(old_mm->core_state)) {
d8ed45c5dcd455 Michel Lespinasse 2020-06-08 998 mmap_read_unlock(old_mm);
f7cfd871ae0c50 Eric W. Biederman 2020-12-03 999 up_write(&tsk->signal->exec_update_lock);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1000 return -EINTR;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1001 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1002 }
eea9673250db4e Eric W. Biederman 2020-03-25 1003
^1da177e4c3f41 Linus Torvalds 2005-04-16 1004 task_lock(tsk);
227a4aadc75ba2 Mathieu Desnoyers 2019-09-19 1005 membarrier_exec_mmap(mm);
ed4e648f7e1f8c Andy Lutomirski 2021-06-22 1006 __activate_mm(mm);
615d6e8756c871 Davidlohr Bueso 2014-04-07 1007 tsk->mm->vmacache_seqnum = 0;
615d6e8756c871 Davidlohr Bueso 2014-04-07 1008 vmacache_flush(tsk);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1009 task_unlock(tsk);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1010 if (old_mm) {
d8ed45c5dcd455 Michel Lespinasse 2020-06-08 1011 mmap_read_unlock(old_mm);
7dddb12c63553d Eric Sesterhenn 2006-04-01 @1012 BUG_ON(active_mm != old_mm);
701085b219016d Oleg Nesterov 2012-03-19 1013 setmax_mm_hiwater_rss(&tsk->signal->maxrss, old_mm);
31a78f23bac006 Balbir Singh 2008-09-28 1014 mm_update_next_owner(old_mm);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1015 mmput(old_mm);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1016 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1017 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1018 mmdrop(active_mm);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1019 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1020 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1021
:::::: The code at line 1012 was first introduced by commit
:::::: 7dddb12c63553db850365cfd066a00416aa8c6cb BUG_ON() Conversion in fs/exec.c
:::::: TO: Eric Sesterhenn <snakebyte@gmx.de>
:::::: CC: Adrian Bunk <bunk@stusta.de>
---
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: 39065 bytes --]
reply other threads:[~2021-07-05 11:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202107051930.DodavemL-lkp@intel.com \
--to=lkp@intel.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.