netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
	m.chetan.kumar@intel.com, linuxwwan@intel.com,
	loic.poulain@linaro.org, ryazanov.s.a@gmail.com,
	johannes@sipsolutions.net
Subject: Re: [PATCH net-next] wwan: iosm: use a flexible array rather than allocate short objects
Date: Thu, 19 May 2022 23:03:53 -0700	[thread overview]
Message-ID: <20220519230353.420c7a46@kernel.org> (raw)
In-Reply-To: <20220520060013.2309497-1-kuba@kernel.org>

On Thu, 19 May 2022 23:00:13 -0700 Jakub Kicinski wrote:
> GCC array-bounds warns that ipc_coredump_get_list() under-allocates
> the size of struct iosm_cd_table *cd_table.
> 
> This is avoidable - we just need a flexible array. Nothing calls
> sizeof() on struct iosm_cd_list or anything that contains it.
> 
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Coincidentally IDK if this:

int ipc_coredump_get_list(struct iosm_devlink *devlink, u16 cmd)

	if (byte_read != MAX_CD_LIST_SIZE)
		goto cd_init_fail;

shouldn't set ret before jumping? Maybe set it to 0 if it's okay for 
it to be zero to make that clear?

  reply	other threads:[~2022-05-20  6:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-20  6:00 [PATCH net-next] wwan: iosm: use a flexible array rather than allocate short objects Jakub Kicinski
2022-05-20  6:03 ` Jakub Kicinski [this message]
2022-05-20 18:12   ` Kumar, M Chetan
2022-05-20 18:13 ` Kumar, M Chetan
2022-05-21  1:10 ` patchwork-bot+netdevbpf

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=20220519230353.420c7a46@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=johannes@sipsolutions.net \
    --cc=linuxwwan@intel.com \
    --cc=loic.poulain@linaro.org \
    --cc=m.chetan.kumar@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=ryazanov.s.a@gmail.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;
as well as URLs for NNTP newsgroup(s).