[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201020100240.5ab806ac@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Tue, 20 Oct 2020 10:02:40 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: zhudi <zhudi21@...wei.com>
Cc: <davem@...emloft.net>, <netdev@...r.kernel.org>,
<rose.chen@...wei.com>
Subject: Re: [PATCH v2] rtnetlink: fix data overflow in rtnl_calcit()
On Tue, 20 Oct 2020 13:51:15 +0800 zhudi wrote:
> @@ -3735,7 +3735,7 @@ static u16 rtnl_calcit(struct sk_buff *skb, struct nlmsghdr *nlh)
> */
> rcu_read_lock();
> for_each_netdev_rcu(net, dev) {
> - min_ifinfo_dump_size = max_t(u16, min_ifinfo_dump_size,
> + min_ifinfo_dump_size = max(min_ifinfo_dump_size,
> if_nlmsg_size(dev,
> ext_filter_mask));
Patch looks good, one trivial adjustment.
As checkpatch.pl points out you need to re-align the continuation lines:
CHECK: Alignment should match open parenthesis
#70: FILE: net/core/rtnetlink.c:3739:
+ min_ifinfo_dump_size = max(min_ifinfo_dump_size,
if_nlmsg_size(dev,
In fact the second parameter should now fit on one line, like this:
min_ifinfo_dump_size = max(min_ifinfo_dump_size,
if_nlmsg_size(dev, ext_filter_mask));
Powered by blists - more mailing lists