Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932638AbdHVML1 (ORCPT ); Tue, 22 Aug 2017 08:11:27 -0400 Received: from mail.ispras.ru ([83.149.199.45]:59034 "EHLO mail.ispras.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932427AbdHVML0 (ORCPT ); Tue, 22 Aug 2017 08:11:26 -0400 From: Anton Volkov Subject: Possible bug in cypress_m8.ko To: dignome@gmail.com, koyama@firstlight.net, johan@kernel.org Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, ldv-project@linuxtesting.org, Alexey Khoroshilov Message-ID: Date: Tue, 22 Aug 2017 15:11:24 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 714 Lines: 27 Hello. Judging by the code of cypress_m8.c some functions are considered to be capable of working concurrently with other functions, e.g. cypress_open. There are, however, entities that are protected by the locks at one place and not protected in another. Lines are given using the info from Linux kernel v4.12. Example: cypress_send spin_lock_irqsave priv->write_urb_in_use = 1; spin_lock_irqrestore (cypress_m8.c: lines 761-763) ... if (result) { priv->write_urb_in_use = 0; //without lock protection (cypress_m8.c: line 783) } Is it a bug? Thank you for your time. -- Anton Volkov Linux Verification Center, ISPRAS web: http://linuxtesting.org e-mail: avolkov@ispras.ru