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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200731062057.GC1508201@kroah.com>
Date:   Fri, 31 Jul 2020 08:20:57 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Oded Gabbay <oded.gabbay@...il.com>
Cc:     Colin King <colin.king@...onical.com>,
        Arnd Bergmann <arnd@...db.de>, Tomer Tayar <ttayar@...ana.ai>,
        Omer Shpigelman <oshpigelman@...ana.ai>,
        Ofir Bitton <obitton@...ana.ai>,
        kernel-janitors@...r.kernel.org,
        "Linux-Kernel@...r. Kernel. Org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH][next] habanalabs: fix incorrect check on failed
 workqueue create

On Thu, Jul 30, 2020 at 01:51:48PM +0300, Oded Gabbay wrote:
> On Thu, Jul 30, 2020 at 11:20 AM Colin King <colin.king@...onical.com> wrote:
> >
> > From: Colin Ian King <colin.king@...onical.com>
> >
> > The null check on a failed workqueue create is currently null checking
> > hdev->cq_wq rather than the pointer hdev->cq_wq[i] and so the test
> > will never be true on a failed workqueue create. Fix this by checking
> > hdev->cq_wq[i].
> >
> > Addresses-Coverity: ("Dereference before null check")
> > Fixes: 5574cb2194b1 ("habanalabs: Assign each CQ with its own work queue")
> > Signed-off-by: Colin Ian King <colin.king@...onical.com>
> > ---
> >  drivers/misc/habanalabs/common/device.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/misc/habanalabs/common/device.c b/drivers/misc/habanalabs/common/device.c
> > index be16b75bdfdb..35214a186913 100644
> > --- a/drivers/misc/habanalabs/common/device.c
> > +++ b/drivers/misc/habanalabs/common/device.c
> > @@ -288,7 +288,7 @@ static int device_early_init(struct hl_device *hdev)
> >         for (i = 0 ; i < hdev->asic_prop.completion_queues_count ; i++) {
> >                 snprintf(workq_name, 32, "hl-free-jobs-%u", i);
> >                 hdev->cq_wq[i] = create_singlethread_workqueue(workq_name);
> > -               if (hdev->cq_wq == NULL) {
> > +               if (hdev->cq_wq[i] == NULL) {
> >                         dev_err(hdev->dev, "Failed to allocate CQ workqueue\n");
> >                         rc = -ENOMEM;
> >                         goto free_cq_wq;
> > --
> > 2.27.0
> >
> 
> This patch is:
> Reviewed-by: Oded Gabbay <oded.gabbay@...il.com>
> 
> Greg, can you please apply it directly to the char-misc-next branch ?
> I don't want to send a pull request for 1 patch.

Already merged :)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ