All of lore.kernel.org
 help / color / mirror / Atom feed
From: guro at fb.com (Roman Gushchin)
Subject: [bug report] selftests: cgroup: add memory controller self-tests
Date: Tue, 26 Jun 2018 10:15:22 -0700	[thread overview]
Message-ID: <20180626171520.GA10359@castle.DHCP.thefacebook.com> (raw)
In-Reply-To: <20180626090347.cuwod4fv5koqbu63@kili.mountain>

On Tue, Jun 26, 2018 at 12:03:48PM +0300, Dan Carpenter wrote:
> Hello Roman Gushchin,
> 
> The patch 84092dbcf901: "selftests: cgroup: add memory controller
> self-tests" from May 11, 2018, leads to the following static checker
> warning:
> 
> 	./tools/testing/selftests/cgroup/test_memcontrol.c:76 test_memcg_subtree_control()
> 	error: uninitialized symbol 'child2'.
> 
> ./tools/testing/selftests/cgroup/test_memcontrol.c
>     69  
>     70  cleanup:
>     71          cg_destroy(child);
>     72          cg_destroy(parent);
>     73          free(parent);
>     74          free(child);
>     75  
>     76          cg_destroy(child2);
> 
> The problem with using one error label to handle all possible returns
> is that some stuff hasn't been initialized yet.
> 
>     77          cg_destroy(parent2);
>     78          free(parent2);
>     79          free(child2);
>     80  
>     81          return ret;
>     82  }

Hello, Dan!

Thanks for the report!
Just sent the fix.

Thanks,
Roman
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: guro@fb.com (Roman Gushchin)
Subject: [bug report] selftests: cgroup: add memory controller self-tests
Date: Tue, 26 Jun 2018 10:15:22 -0700	[thread overview]
Message-ID: <20180626171520.GA10359@castle.DHCP.thefacebook.com> (raw)
Message-ID: <20180626171522.E3oZC_pFD873GPhLyfUjO_BV766uO7fSDAhglS48_Lw@z> (raw)
In-Reply-To: <20180626090347.cuwod4fv5koqbu63@kili.mountain>

On Tue, Jun 26, 2018@12:03:48PM +0300, Dan Carpenter wrote:
> Hello Roman Gushchin,
> 
> The patch 84092dbcf901: "selftests: cgroup: add memory controller
> self-tests" from May 11, 2018, leads to the following static checker
> warning:
> 
> 	./tools/testing/selftests/cgroup/test_memcontrol.c:76 test_memcg_subtree_control()
> 	error: uninitialized symbol 'child2'.
> 
> ./tools/testing/selftests/cgroup/test_memcontrol.c
>     69  
>     70  cleanup:
>     71          cg_destroy(child);
>     72          cg_destroy(parent);
>     73          free(parent);
>     74          free(child);
>     75  
>     76          cg_destroy(child2);
> 
> The problem with using one error label to handle all possible returns
> is that some stuff hasn't been initialized yet.
> 
>     77          cg_destroy(parent2);
>     78          free(parent2);
>     79          free(child2);
>     80  
>     81          return ret;
>     82  }

Hello, Dan!

Thanks for the report!
Just sent the fix.

Thanks,
Roman
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2018-06-26 17:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-26  9:03 [bug report] selftests: cgroup: add memory controller self-tests dan.carpenter
2018-06-26  9:03 ` Dan Carpenter
2018-06-26 17:14 ` [PATCH] selftests: cgroup: fix cleanup path in test_memcg_subtree_control() guro
2018-06-26 17:14   ` Roman Gushchin
2018-06-26 17:15 ` guro [this message]
2018-06-26 17:15   ` [bug report] selftests: cgroup: add memory controller self-tests Roman Gushchin
2018-06-26 17:22 ` [PATCH v2] selftests: cgroup: fix cleanup path in test_memcg_subtree_control() guro
2018-06-26 17:22   ` Roman Gushchin
  -- strict thread matches above, loose matches on Subject: below --
2019-03-27  7:32 [bug report] selftests: cgroup: add memory controller self-tests dan.carpenter
2019-03-27  7:32 ` Dan Carpenter
2019-03-27 22:24 ` guro
2019-03-27 22:24   ` Roman Gushchin
2019-03-27 22:50   ` shuah
2019-03-27 22:50     ` shuah
2019-03-28  2:58     ` guro
2019-03-28  2:58       ` Roman Gushchin
2018-05-17 13:22 dan.carpenter
2018-05-17 13:22 ` Dan Carpenter
2018-05-17 15:56 ` guro
2018-05-17 15:56   ` Roman Gushchin

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=20180626171520.GA10359@castle.DHCP.thefacebook.com \
    --to=unknown@example.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 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.