[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20231208160245.3db141ba@kernel.org>
Date: Fri, 8 Dec 2023 16:02:45 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Hyunwoo Kim <v4bel@...ori.io>
Cc: davem@...emloft.net, edumazet@...gle.com, imv4bel@...il.com,
pabeni@...hat.com, netdev@...r.kernel.org
Subject: Re: [PATCH] atm: Fix Use-After-Free in do_vcc_ioctl
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
Powered by blists - more mailing lists