linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <fengguang.wu@intel.com>
Cc: kbuild-all@01.org, linux-mm@kvack.org, Michal Hocko <mhocko@suse.com>
Subject: [memcg:attempts/process-share-mm-oom-sanitization 390/393] mm/oom_kill.c:731:7: warning: 'p' is used uninitialized in this function
Date: Fri, 3 Jun 2016 18:10:02 +0800	[thread overview]
Message-ID: <201606031800.X4UtDo5W%fengguang.wu@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1794 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mhocko/mm.git attempts/process-share-mm-oom-sanitization
head:   15facfb929a0b749a8b1005a21b699c6ec80640c
commit: d688abea97c97609b048b52900e10f38ceae5a49 [390/393] mm, oom: fortify task_will_free_mem
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
        git checkout d688abea97c97609b048b52900e10f38ceae5a49
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   mm/oom_kill.c: In function 'task_will_free_mem':
>> mm/oom_kill.c:731:7: warning: 'p' is used uninitialized in this function [-Wuninitialized]
     if (!__task_will_free_mem(p))
          ^~~~~~~~~~~~~~~~~~~~~~~

vim +/p +731 mm/oom_kill.c

   715			return true;
   716	
   717		return false;
   718	}
   719	
   720	/*
   721	 * Checks whether the given task is dying or exiting and likely to
   722	 * release its address space. This means that all threads and processes
   723	 * sharing the same mm have to be killed or exiting.
   724	 */
   725	bool task_will_free_mem(struct task_struct *task)
   726	{
   727		struct mm_struct *mm;
   728		struct task_struct *p;
   729		bool ret;
   730	
 > 731		if (!__task_will_free_mem(p))
   732			return false;
   733	
   734		/*
   735		 * If the process has passed exit_mm we have to skip it because
   736		 * we have lost a link to other tasks sharing this mm, we do not
   737		 * have anything to reap and the task might then get stuck waiting
   738		 * for parent as zombie and we do not want it to hold TIF_MEMDIE
   739		 */

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 54488 bytes --]

                 reply	other threads:[~2016-06-03 10:11 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=201606031800.X4UtDo5W%fengguang.wu@intel.com \
    --to=fengguang.wu@intel.com \
    --cc=kbuild-all@01.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox