lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK8P3a22NhkuWLvFh2+UYEcvzVOf_9m_GdLREqfCCK-+=Q9tug@mail.gmail.com>
Date:   Tue, 28 Sep 2021 10:58:14 +0200
From:   Arnd Bergmann <arnd@...nel.org>
To:     "huangguangbin (A)" <huangguangbin2@...wei.com>
Cc:     Yisen Zhuang <yisen.zhuang@...wei.com>,
        Salil Mehta <salil.mehta@...wei.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Arnd Bergmann <arnd@...db.de>,
        Huazhong Tan <tanhuazhong@...wei.com>,
        Yufeng Mo <moyufeng@...wei.com>,
        Jiaran Zhang <zhangjiaran@...wei.com>,
        Jian Shen <shenjian15@...wei.com>,
        Networking <netdev@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: hns3: fix hclge_dbg_dump_tm_pg() stack usage

On Tue, Sep 28, 2021 at 10:34 AM huangguangbin (A)
<huangguangbin2@...wei.com> wrote:
> On 2021/9/27 17:49, Arnd Bergmann wrote: From: Arnd Bergmann <arnd@...db.de>

> > +static int hclge_dbg_dump_tm_pg(struct hclge_dev *hdev, char *buf, int len)
> > +{
> > +     int ret;
> > +     char *data_str = kcalloc(ARRAY_SIZE(tm_pg_items),
> > +                              HCLGE_DBG_DATA_STR_LEN, GFP_KERNEL);
> > +
> Hi Arnd, thanks your modification, according to linux code style, should the code be written as follow?
>
>         char *data_str;
>         int ret;
>
>         data_str = kcalloc(ARRAY_SIZE(tm_pg_items),
>                            HCLGE_DBG_DATA_STR_LEN, GFP_KERNEL);

That's actually one of the versions I tried, but I didn't really like
any of them, so
I went with the shorter version.

Sending a v2 now with that changed black.

        Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ