From: patchwork-bot+netdevbpf@kernel.org
To: Stefano Garzarella <sgarzare@redhat.com>
Cc: netdev@vger.kernel.org, kuba@kernel.org,
virtualization@lists.linux-foundation.org, davem@davemloft.net,
marcandre.lureau@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] vsock_diag_test: remove free_sock_stat() call in test_no_sockets
Date: Sat, 16 Oct 2021 00:50:08 +0000 [thread overview]
Message-ID: <163434540858.9644.11112420897494731815.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20211014152045.173872-1-sgarzare@redhat.com>
Hello:
This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 14 Oct 2021 17:20:45 +0200 you wrote:
> In `test_no_sockets` we don't expect any sockets, indeed
> check_no_sockets() prints an error and exits if `sockets` list is
> not empty, so free_sock_stat() call is unnecessary since it would
> only be called when the `sockets` list is empty.
>
> This was discovered by a strange warning printed by gcc v11.2.1:
> In file included from ../../include/linux/list.h:7,
> from vsock_diag_test.c:18:
> vsock_diag_test.c: In function ‘test_no_sockets’:
> ../../include/linux/kernel.h:35:45: error: array subscript ‘struct vsock_stat[0]’ is partly outside array bound
> s of ‘struct list_head[1]’ [-Werror=array-bounds]
> 35 | const typeof(((type *)0)->member) * __mptr = (ptr); \
> | ^~~~~~
> ../../include/linux/list.h:352:9: note: in expansion of macro ‘container_of’
> 352 | container_of(ptr, type, member)
> | ^~~~~~~~~~~~
> ../../include/linux/list.h:393:9: note: in expansion of macro ‘list_entry’
> 393 | list_entry((pos)->member.next, typeof(*(pos)), member)
> | ^~~~~~~~~~
> ../../include/linux/list.h:522:21: note: in expansion of macro ‘list_next_entry’
> 522 | n = list_next_entry(pos, member); \
> | ^~~~~~~~~~~~~~~
> vsock_diag_test.c:325:9: note: in expansion of macro ‘list_for_each_entry_safe’
> 325 | list_for_each_entry_safe(st, next, sockets, list) {
> | ^~~~~~~~~~~~~~~~~~~~~~~~
> In file included from vsock_diag_test.c:18:
> vsock_diag_test.c:333:19: note: while referencing ‘sockets’
> 333 | LIST_HEAD(sockets);
> | ^~~~~~~
> ../../include/linux/list.h:23:26: note: in definition of macro ‘LIST_HEAD’
> 23 | struct list_head name = LIST_HEAD_INIT(name)
>
> [...]
Here is the summary with links:
- [net] vsock_diag_test: remove free_sock_stat() call in test_no_sockets
https://git.kernel.org/netdev/net/c/ba95a6225b02
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
prev parent reply other threads:[~2021-10-16 0:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-14 15:20 Stefano Garzarella
2021-10-16 0:50 ` patchwork-bot+netdevbpf [this message]
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=163434540858.9644.11112420897494731815.git-patchwork-notify@kernel.org \
--to=patchwork-bot+netdevbpf@kernel.org \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcandre.lureau@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=sgarzare@redhat.com \
--cc=virtualization@lists.linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®