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:   Tue, 2 May 2017 07:41:34 -0500
From:   Rob Herring <robh@...nel.org>
To:     Johan Hovold <johan@...nel.org>
Cc:     Stefan Wahren <stefan.wahren@...e.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jslaby@...e.com>,
        Sebastian Reichel <sre@...nel.org>,
        Guenter Roeck <linux@...ck-us.net>,
        Andy Shevchenko <andy.shevchenko@...il.com>,
        Andrey Smirnov <andrew.smirnov@...il.com>,
        "linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] serdev: Restore serdev_device_write_buf for atomic context

On Tue, May 2, 2017 at 4:06 AM, Johan Hovold <johan@...nel.org> wrote:
> On Fri, Apr 28, 2017 at 01:47:21PM +0200, Stefan Wahren wrote:
>> Starting with commit 6fe729c4bdae ("serdev: Add serdev_device_write
>> subroutine") the function serdev_device_write_buf cannot be used in
>> atomic context anymore (mutex_lock is sleeping). So restore the old
>> behavior.
>
> Yeah, preventing use in atomic context seems unnecessary, although any
> clients writing must now deal with serialisation themselves (as before,
> and as they should).

We could just remove the mutex for serdev_device_write and always make
the client responsible for serialization.

> Calling wait_for_completion in the non-blocking case was also needlessly
> inefficient.

It won't be called because count should be 0.

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ