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: <CAOuDEK1=X7NdWLMdbHzpO_g15p6JeU0_vb+YOs6TXc2hNfxmJQ@mail.gmail.com>
Date: Wed, 9 Oct 2024 19:36:00 +0800
From: Guan-Yu Lin <guanyulin@...gle.com>
To: Amadeusz Sławiński <amadeuszx.slawinski@...ux.intel.com>
Cc: Thinh.Nguyen@...opsys.com, gregkh@...uxfoundation.org, 
	mathias.nyman@...el.com, stern@...land.harvard.edu, elder@...nel.org, 
	oneukum@...e.com, yajun.deng@...ux.dev, dianders@...omium.org, 
	kekrby@...il.com, perex@...ex.cz, tiwai@...e.com, tj@...nel.org, 
	stanley_chang@...ltek.com, andreyknvl@...il.com, 
	christophe.jaillet@...adoo.fr, quic_jjohnson@...cinc.com, 
	ricardo@...liere.net, grundler@...omium.org, niko.mauno@...sala.com, 
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org, 
	linux-sound@...r.kernel.org, badhri@...gle.com, albertccwang@...gle.com, 
	quic_wcheng@...cinc.com, pumahsu@...gle.com
Subject: Re: [PATCH v4 3/5] usb: add apis for sideband uasge tracking

On Wed, Oct 9, 2024 at 3:33 PM Amadeusz Sławiński
<amadeuszx.slawinski@...ux.intel.com> wrote:
>
> On 10/9/2024 7:42 AM, Guan-Yu Lin wrote:
> >
> > +void usb_sideband_get(struct usb_device *udev)
> > +{
> > +     struct usb_device *parent = udev;
>
> Is it really "parent" in this case? Perhaps better variable name would
> just be "device".
>
Thanks for the heads-up, will change it to "device" in the next patchset.
> > +
> > +     do {
> > +             atomic_inc(&parent->sb_usage_count);
> > +             parent = parent->parent;
> > +     } while (parent);
> > +}
> > +EXPORT_SYMBOL_GPL(usb_sideband_get);
> > +
>
> Similarly here.
>
> > +
> > +     do {
> > +             atomic_dec(&parent->sb_usage_count);
> > +             parent = parent->parent;
> > +     } while (parent);
> > +}
> > +EXPORT_SYMBOL_GPL(usb_sideband_put);
> > +

Regards,
Guan-Yu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ