All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Roman Gushchin <roman.gushchin@linux.dev>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [rgushchin:bpfoom.1.5 9/15] mm/oom_kill.c:1322:3: warning: ignoring return value of 'mutex_lock_killable' declared with attribute 'warn_unused_result'
Date: Fri, 8 Aug 2025 11:01:36 +0800	[thread overview]
Message-ID: <202508081005.HrsXuffx-lkp@intel.com> (raw)

tree:   https://github.com/rgushchin/linux.git bpfoom.1.5
head:   73a652feddb7a276263957c6da871db88aac944a
commit: 7aa3eecc03bb0d299d692379514156fcac7e4709 [9/15] mm: introduce bpf_out_of_memory() bpf kfunc
config: arm-randconfig-002-20250808 (https://download.01.org/0day-ci/archive/20250808/202508081005.HrsXuffx-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 10.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250808/202508081005.HrsXuffx-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/oe-kbuild-all/202508081005.HrsXuffx-lkp@intel.com/

All warnings (new ones prefixed by >>):

   mm/oom_kill.c: In function 'bpf_out_of_memory':
>> mm/oom_kill.c:1322:3: warning: ignoring return value of 'mutex_lock_killable' declared with attribute 'warn_unused_result' [-Wunused-result]
    1322 |   mutex_lock_killable(&oom_lock);
         |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +1322 mm/oom_kill.c

  1307	
  1308	__bpf_kfunc int bpf_out_of_memory(struct mem_cgroup *memcg__nullable,
  1309					  int order, bool wait_on_oom_lock)
  1310	{
  1311		struct oom_control oc = {
  1312			.type = OOM_TYPE_BPF,
  1313			.memcg = memcg__nullable,
  1314			.order = order,
  1315		};
  1316		int ret;
  1317	
  1318		if (oc.order < 0 || oc.order > MAX_PAGE_ORDER)
  1319			return -EINVAL;
  1320	
  1321		if (wait_on_oom_lock)
> 1322			mutex_lock_killable(&oom_lock);
  1323		else if (!mutex_trylock(&oom_lock))
  1324			return -EBUSY;
  1325	
  1326		ret = out_of_memory(&oc);
  1327	
  1328		mutex_unlock(&oom_lock);
  1329		return ret;
  1330	}
  1331	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2025-08-08  3:02 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=202508081005.HrsXuffx-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=roman.gushchin@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.