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>] [day] [month] [year] [list]
Message-ID: <20151015205232.GA70439@DGOODELL-M-F02A.cisco.com>
Date:	Thu, 15 Oct 2015 15:52:32 -0500
From:	Dave Goodell <dgoodell@...co.com>
To:	Insu Yun <wuninsu@...il.com>
Cc:	"umalhi@...co.com" <umalhi@...co.com>,
	"dledford@...hat.com" <dledford@...hat.com>,
	"sean.hefty@...el.com" <sean.hefty@...el.com>,
	"hal.rosenstock@...il.com" <hal.rosenstock@...il.com>,
	"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"taesoo@...ech.edu" <taesoo@...ech.edu>,
	"yeongjin.jang@...ech.edu" <yeongjin.jang@...ech.edu>,
	"insu@...ech.edu" <insu@...ech.edu>
Subject: Re: [PATCH] usnic: corretly check failed allocation

On Thu, Oct 15, 2015 at 01:41:06PM -0400, Insu Yun wrote:
> On Thu, Oct 15, 2015 at 1:17 PM, Dave Goodell (dgoodell) <dgoodell@...co.com
> > wrote:
> 
> > On Oct 15, 2015, at 11:27 AM, Insu Yun <wuninsu@...il.com> wrote:
> > >
> > >       us_ibdev->ufdev = usnic_fwd_dev_alloc(dev);
> > > -     if (IS_ERR_OR_NULL(us_ibdev->ufdev)) {
> > > +     if (!us_ibdev->ufdev) {
> > >               usnic_err("Failed to alloc ufdev for %s with err %ld\n",
> > >                               pci_name(dev), PTR_ERR(us_ibdev->ufdev));
> >
> > This PTR_ERR and message make less sense now.
> >
> 
>   Do you think what is better? removing error code? or change
> PTR_ERR(us_ibdev->ufdev)
> to -EFAULT

I would write it as:

        usnic_err("Failed to alloc ufdev for %s\n", pci_name(dev));

-Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ