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: <20210714083046.GX1954@kadam>
Date:   Wed, 14 Jul 2021 11:30:46 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Dongliang Mu <mudongliangabcd@...il.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        YueHaibing <yuehaibing@...wei.com>,
        Anirudh Rayabharam <mail@...rudhrb.com>,
        Oliver Neukum <oneukum@...e.com>,
        Jakub Kicinski <kuba@...nel.org>,
        syzbot+44d53c7255bb1aea22d2@...kaller.appspotmail.com,
        Zheng Yongjun <zhengyongjun3@...wei.com>,
        Emil Renner Berthing <kernel@...il.dk>,
        linux-usb@...r.kernel.org,
        "open list:NETWORKING [GENERAL]" <netdev@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Johan Hovold <johan@...nel.org>
Subject: Re: [PATCH 1/2] usb: hso: fix error handling code of
 hso_create_net_device

On Wed, Jul 14, 2021 at 04:14:18PM +0800, Dongliang Mu wrote:
> > @@ -2523,18 +2523,18 @@ static struct hso_device *hso_create_net_device(struct usb_interface *interface,
> >         for (i = 0; i < MUX_BULK_RX_BUF_COUNT; i++) {
> >                 hso_net->mux_bulk_rx_urb_pool[i] = usb_alloc_urb(0, GFP_KERNEL);
> >                 if (!hso_net->mux_bulk_rx_urb_pool[i])
> > -                       goto exit;
> > +                       goto err_mux_bulk_rx;
> >                 hso_net->mux_bulk_rx_buf_pool[i] = kzalloc(MUX_BULK_RX_BUF_SIZE,
> >                                                            GFP_KERNEL);
> >                 if (!hso_net->mux_bulk_rx_buf_pool[i])
> > -                       goto exit;
> > +                       goto err_mux_bulk_rx;
> >         }
> >         hso_net->mux_bulk_tx_urb = usb_alloc_urb(0, GFP_KERNEL);
> >         if (!hso_net->mux_bulk_tx_urb)
> > -               goto exit;
> > +               goto err_mux_bulk_rx;
> >         hso_net->mux_bulk_tx_buf = kzalloc(MUX_BULK_TX_BUF_SIZE, GFP_KERNEL);
> >         if (!hso_net->mux_bulk_tx_buf)
> > -               goto exit;
> > +               goto err_mux_bulk_tx;

I would probably have called this err free_tx_urb or something like
that.

> >
> >         add_net_device(hso_dev);
> >
> > @@ -2542,7 +2542,7 @@ static struct hso_device *hso_create_net_device(struct usb_interface *interface,
> >         result = register_netdev(net);
> >         if (result) {
> >                 dev_err(&interface->dev, "Failed to register device\n");
> > -               goto exit;
> > +               goto err_register;

This is still Come From style.  I wouldn't have commented except that
you said you are giong to redo the patch for other reasons.

It looks good.  Straight forward to review now.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ