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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALs4sv1-KSdrPcErmn8z8WGrrFpASZPbNsmAV8Td77Vq-VQZhA@mail.gmail.com>
Date: Thu, 29 Jan 2026 19:25:29 +0530
From: Pavan Chebbi <pavan.chebbi@...adcom.com>
To: Leon Romanovsky <leon@...nel.org>
Cc: jgg@...pe.ca, michael.chan@...adcom.com, linux-kernel@...r.kernel.org, 
	dave.jiang@...el.com, saeedm@...dia.com, Jonathan.Cameron@...wei.com, 
	gospo@...adcom.com, selvin.xavier@...adcom.com, 
	kalesh-anakkur.purayil@...adcom.com
Subject: Re: [PATCH v2 fwctl 2/5] fwctl/bnxt_en: Refactor aux bus functions to
 be more generic

>
> >  void bnxt_ulp_stop(struct bnxt *bp)
> >  {
> > -     struct bnxt_aux_priv *aux_priv = bp->aux_priv;
> > -     struct bnxt_en_dev *edev = bp->edev;
> > -
> > -     if (!edev)
> > -             return;
> > +     int i;
> >
> > -     mutex_lock(&edev->en_dev_lock);
> > -     if (!bnxt_ulp_registered(edev) ||
> > -         (edev->flags & BNXT_EN_FLAG_ULP_STOPPED))
> > -             goto ulp_stop_exit;
> > -
> > -     edev->flags |= BNXT_EN_FLAG_ULP_STOPPED;
> > -     if (aux_priv) {
> > +     for (i = 0; i < __BNXT_AUXDEV_MAX; i++) {
> > +             struct bnxt_aux_priv *aux_priv;
> >               struct auxiliary_device *adev;
> > +             struct bnxt_en_dev *edev;
> > +
> > +             if (!bnxt_auxdev_is_active(bp, i))
>
> It’s good that you stopped using atomic_t for state variables, but the
> locking is still incorrect. It’s not enough to hold the lock only while
> reading the state; you need to keep the lock for the entire period during
> which the auxdev is expected to remain active.

Ok, let me try improve further.

>
> Thanks

Download attachment "smime.p7s" of type "application/pkcs7-signature" (5469 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ