All of lore.kernel.org
 help / color / mirror / Atom feed
* [zen-kernel-zen-kernel:5.6/muqss 1/18] kernel/sched/MuQSS.c:613:3: warning: Either the condition '!task' is redundant or there is possible null pointer dereference: task. [nullPointerRedundantCheck]
@ 2020-05-09  1:06 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2020-05-09  1:06 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
TO: Con Kolivas <kernel@kolivas.org>
CC: Steven Barrett <steven@liquorix.net>

tree:   https://github.com/zen-kernel/zen-kernel 5.6/muqss
head:   e70073b6a71de959a53ff82f74481c15fa23b2cd
commit: edbc5ae3fb7ae074a02e40802df66ae90ff4888e [1/18] MultiQueue Skiplist Scheduler v0.198
:::::: branch date: 3 days ago
:::::: commit date: 3 weeks ago

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>


cppcheck warnings: (new ones prefixed by >>)

>> kernel/sched/MuQSS.c:613:3: warning: Either the condition '!task' is redundant or there is possible null pointer dereference: task. [nullPointerRedundantCheck]
     task->wake_q.next = NULL;
     ^
   kernel/sched/MuQSS.c:610:10: note: Assuming that condition '!task' is not redundant
     BUG_ON(!task);
            ^
   kernel/sched/MuQSS.c:609:22: note: Assignment 'task=container_of(node,struct task_struct,wake_q)', assigned value is 0
     task = container_of(node, struct task_struct, wake_q);
                        ^
   kernel/sched/MuQSS.c:613:3: note: Null pointer dereference
     task->wake_q.next = NULL;
     ^
>> kernel/sched/MuQSS.c:4812:18: warning: Local variable 'rlim_rtprio' shadows outer variable [shadowVariable]
      unsigned long rlim_rtprio =
                    ^
   kernel/sched/MuQSS.c:4754:16: note: Shadowed declaration
    unsigned long rlim_rtprio = 0;
                  ^
   kernel/sched/MuQSS.c:4812:18: note: Shadow variable
      unsigned long rlim_rtprio =
                    ^

# https://github.com/zen-kernel/zen-kernel/commit/edbc5ae3fb7ae074a02e40802df66ae90ff4888e
git remote add zen-kernel-zen-kernel https://github.com/zen-kernel/zen-kernel
git remote update zen-kernel-zen-kernel
git checkout edbc5ae3fb7ae074a02e40802df66ae90ff4888e
vim +613 kernel/sched/MuQSS.c

edbc5ae3fb7ae07 Con Kolivas 2019-10-25  601  
edbc5ae3fb7ae07 Con Kolivas 2019-10-25  602  void wake_up_q(struct wake_q_head *head)
edbc5ae3fb7ae07 Con Kolivas 2019-10-25  603  {
edbc5ae3fb7ae07 Con Kolivas 2019-10-25  604  	struct wake_q_node *node = head->first;
edbc5ae3fb7ae07 Con Kolivas 2019-10-25  605  
edbc5ae3fb7ae07 Con Kolivas 2019-10-25  606  	while (node != WAKE_Q_TAIL) {
edbc5ae3fb7ae07 Con Kolivas 2019-10-25  607  		struct task_struct *task;
edbc5ae3fb7ae07 Con Kolivas 2019-10-25  608  
edbc5ae3fb7ae07 Con Kolivas 2019-10-25  609  		task = container_of(node, struct task_struct, wake_q);
edbc5ae3fb7ae07 Con Kolivas 2019-10-25  610  		BUG_ON(!task);
edbc5ae3fb7ae07 Con Kolivas 2019-10-25  611  		/* Task can safely be re-inserted now */
edbc5ae3fb7ae07 Con Kolivas 2019-10-25  612  		node = node->next;
edbc5ae3fb7ae07 Con Kolivas 2019-10-25 @613  		task->wake_q.next = NULL;
edbc5ae3fb7ae07 Con Kolivas 2019-10-25  614  
edbc5ae3fb7ae07 Con Kolivas 2019-10-25  615  		/*
edbc5ae3fb7ae07 Con Kolivas 2019-10-25  616  		 * wake_up_process() executes a full barrier, which pairs with
edbc5ae3fb7ae07 Con Kolivas 2019-10-25  617  		 * the queueing in wake_q_add() so as not to miss wakeups.
edbc5ae3fb7ae07 Con Kolivas 2019-10-25  618  		 */
edbc5ae3fb7ae07 Con Kolivas 2019-10-25  619  		wake_up_process(task);
edbc5ae3fb7ae07 Con Kolivas 2019-10-25  620  		put_task_struct(task);
edbc5ae3fb7ae07 Con Kolivas 2019-10-25  621  	}
edbc5ae3fb7ae07 Con Kolivas 2019-10-25  622  }
edbc5ae3fb7ae07 Con Kolivas 2019-10-25  623  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-05-09  1:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-09  1:06 [zen-kernel-zen-kernel:5.6/muqss 1/18] kernel/sched/MuQSS.c:613:3: warning: Either the condition '!task' is redundant or there is possible null pointer dereference: task. [nullPointerRedundantCheck] kbuild test robot

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.