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]
Date:   Wed, 17 Jan 2018 14:33:00 +0100
From:   Greg KH <greg@...ah.com>
To:     ShuFanLee <leechu729@...il.com>
Cc:     heikki.krogerus@...ux.intel.com, cy_huang@...htek.com,
        shufan_lee@...htek.com, linux-kernel@...r.kernel.org,
        linux-usb@...r.kernel.org
Subject: Re: [PATCH] USB TYPEC: RT1711H Type-C Chip Driver

On Wed, Jan 10, 2018 at 02:59:12PM +0800, ShuFanLee wrote:
> +static inline void rt1711h_poll_ctrl(struct rt1711h_chip *chip)
> +{
> +	cancel_delayed_work_sync(&chip->poll_work);
> +
> +	if (atomic_read(&chip->poll_count) == 0) {
> +		atomic_inc(&chip->poll_count);
> +		cpu_idle_poll_ctrl(true);
> +	}
> +
> +	schedule_delayed_work(&chip->poll_work, msecs_to_jiffies(40));
> +}

This is very odd, and not good.  What are you trying to do here?  And
why are you thinking that poll_count should be an atomic variable?

This feels really strange, and not something you should be doing in an
irq handler, right?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ