All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Hyunwoo Kim <v4bel@theori.io>
Cc: davem@davemloft.net, edumazet@google.com, imv4bel@gmail.com,
	pabeni@redhat.com, netdev@vger.kernel.org
Subject: Re: [PATCH] atm: Fix Use-After-Free in do_vcc_ioctl
Date: Fri, 8 Dec 2023 16:02:45 -0800	[thread overview]
Message-ID: <20231208160245.3db141ba@kernel.org> (raw)
In-Reply-To: <20231206123118.GA15625@ubuntu>

On Wed, 6 Dec 2023 04:31:18 -0800 Hyunwoo Kim wrote:
> +		if ((skb = skb_peek(&sk->sk_receive_queue)) != NULL)
> +			amount = skb->len;

Please run checkpatch, no assignments in if () statements.
This is better written with a ternary op IMO, anyway:

	skb = peek()
	amount = skb ? skb->len : 0;

When you repost please put [PATCH net v2] as the tag.
-- 
pw-bot: cr

      reply	other threads:[~2023-12-09  0:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-06 12:31 [PATCH] atm: Fix Use-After-Free in do_vcc_ioctl Hyunwoo Kim
2023-12-09  0:02 ` Jakub Kicinski [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=20231208160245.3db141ba@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=imv4bel@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=v4bel@theori.io \
    /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.