[PATCH] usb: storage: Fix a possible data race in uas_queuecommand_lck

2018-05-08 Thread Jia-Ju Bai
The write operations to "cmnd->result" and "cmnd->scsi_done" are protected by the lock on line 642-643, but the write operations to these data on line 634-635 are not protected by the lock. Thus, there may exist a data race for "cmnd->result" and "cmnd->scsi_done". To fix this data race, the wr

Re: [usb-storage] [PATCH] usb: storage: Fix a possible data race in uas_queuecommand_lck

2018-05-08 Thread Oliver Neukum
Am Dienstag, den 08.05.2018, 15:47 +0800 schrieb Jia-Ju Bai: > The write operations to "cmnd->result" and "cmnd->scsi_done" > are protected by the lock on line 642-643, but the write operations > to these data on line 634-635 are not protected by the lock. > Thus, there may exist a data race for

Re: [usb-storage] [PATCH] usb: storage: Fix a possible data race in uas_queuecommand_lck

2018-05-08 Thread Jia-Ju Bai
On 2018/5/8 16:27, Oliver Neukum wrote: Am Dienstag, den 08.05.2018, 15:47 +0800 schrieb Jia-Ju Bai: The write operations to "cmnd->result" and "cmnd->scsi_done" are protected by the lock on line 642-643, but the write operations to these data on line 634-635 are not protected by the lock. Thu

Re: [PATCH v5 0/6] firmware_loader: cleanups for v4.18

2018-05-08 Thread Luis R. Rodriguez
On Fri, May 04, 2018 at 10:43:49AM -0700, Luis R. Rodriguez wrote: > Greg, > > I've reviewed the pending patches for the firmware_laoder and as for > v4.18, the following 3 patches from Andres have been iterated enough > that they're ready after I made some final minor changes, mostly just > style

Re: [PATCH] mptlan: fix mpt_lan_sdu_send()'s return type

2018-05-08 Thread Luc Van Oostenryck
On Tue, May 08, 2018 at 01:21:56AM -0400, Martin K. Petersen wrote: > > Luc, > > > The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', > > which is a typedef for an enum type, but the implementation in this > > driver returns an 'int'. > > You forgot to update the function prot

Re: [PATCH v2] target/file: add support of direct and async I/O

2018-05-08 Thread Mike Christie
On 05/08/2018 12:47 AM, Martin K. Petersen wrote: > > Bryant, > >> Can you review this patch and pull it into scsi since Nicholas has >> been out for awhile? >> >> I have tested this patch and really like the performance enhancements >> as a result of it. > > No problem queuing it up if I get an

[PATCH v6 12/13] Documentation: remove stale firmware API reference

2018-05-08 Thread Luis R. Rodriguez
It refers to a pending patch, but this was merged eons ago. Signed-off-by: Luis R. Rodriguez --- Documentation/dell_rbu.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/Documentation/dell_rbu.txt b/Documentation/dell_rbu.txt index 0fdb6aa2704c..077fdc29a0d0 100644 --- a/Documentation/de

[PATCH v6 13/13] Documentation: clarify firmware_class provenance and why we can't rename the module

2018-05-08 Thread Luis R. Rodriguez
Clarify the provenance of the firmware loader firmware_class module name and why we cannot rename the module in the future. Signed-off-by: Luis R. Rodriguez --- .../driver-api/firmware/fallback-mechanisms.rst | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/D

[PATCH v6 11/13] Documentation: fix few typos and clarifications for the firmware loader

2018-05-08 Thread Luis R. Rodriguez
Fix a few typos, and clarify a few sentences. Signed-off-by: Luis R. Rodriguez --- Documentation/driver-api/firmware/fallback-mechanisms.rst | 5 +++-- Documentation/driver-api/firmware/firmware_cache.rst | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Documentation

[PATCH v6 08/13] firmware: add firmware_request_nowarn() - load firmware without warnings

2018-05-08 Thread Luis R. Rodriguez
From: Andres Rodriguez Currently the firmware loader only exposes one silent path for querying optional firmware, and that is firmware_request_direct(). This function also disables the sysfs fallback mechanism, which might not always be the desired behaviour [0]. This patch introduces a variatio

[PATCH v6 10/13] ath10k: re-enable the firmware fallback mechanism for testmode

2018-05-08 Thread Luis R. Rodriguez
From: Andres Rodriguez The ath10k testmode uses request_firmware_direct() in order to avoid producing firmware load warnings. Disabling the fallback mechanism was a side effect of disabling warnings. We now have a new API that allows us to avoid warnings while keeping the fallback mechanism enab

[PATCH v6 07/13] firmware_loader: make firmware_fallback_sysfs() print more useful

2018-05-08 Thread Luis R. Rodriguez
If we resort to using the sysfs fallback mechanism we don't print the filename. This can be deceiving given we could have a series of callers intertwined and it'd be unclear exactly for what firmware this was meant for. Additionally, although we don't currently use FW_OPT_NO_WARN when dealing with

[PATCH v6 09/13] ath10k: use firmware_request_nowarn() to load firmware

2018-05-08 Thread Luis R. Rodriguez
From: Andres Rodriguez This reduces the unnecessary spew when trying to load optional firmware: "Direct firmware load for ... failed with error -2" Signed-off-by: Andres Rodriguez Acked-by: Kalle Valo Signed-off-by: Luis R. Rodriguez --- drivers/net/wireless/ath/ath10k/core.c | 2 +- 1 file

[PATCH v6 06/13] firmware_loader: move kconfig FW_LOADER entries to its own file

2018-05-08 Thread Luis R. Rodriguez
This will make it easier to track and easier to understand what components and features are part of the FW_LOADER. There are some components related to firmware which have *nothing* to do with the FW_LOADER, souch as PREVENT_FIRMWARE_BUILD. Signed-off-by: Luis R. Rodriguez --- drivers/base/Kconf

[PATCH v6 05/13] firmware_loader: enhance Kconfig documentation over FW_LOADER

2018-05-08 Thread Luis R. Rodriguez
If you try to read FW_LOADER today it speaks of old riddles and unless you have been following development closely you will loose track of what is what. Even the documentation for PREVENT_FIRMWARE_BUILD is a bit fuzzy and how it fits into this big picture. Give the FW_LOADER kconfig documentation

[PATCH v6 03/13] firmware: rename fw_sysfs_fallback to firmware_fallback_sysfs()

2018-05-08 Thread Luis R. Rodriguez
From: Andres Rodriguez This is done since this call is now exposed through kernel-doc, and since this also paves the way for different future types of fallback mechanims. Signed-off-by: Andres Rodriguez Acked-by: Luis R. Rodriguez [mcgrof: small coding style changes] Signed-off-by: Luis R. Rod

[PATCH v6 04/13] firmware_loader: document firmware_sysfs_fallback()

2018-05-08 Thread Luis R. Rodriguez
This also sets the expecations for future fallback interfaces, even if they are not exported. Signed-off-by: Luis R. Rodriguez --- drivers/base/firmware_loader/fallback.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/base/firmware_loader/fallback.c b/drivers/

[PATCH v6 00/13] firmware_loader changes for v4.18

2018-05-08 Thread Luis R. Rodriguez
ation which have come up recently. These changes are available on my git tree both based on linux-next [0] and Linus' latest tree [1]. Folks working on new developments for the firmware loader can use my linux-next branch 20180508-firmware_loader_for-v4.18-try2 for now. 0-day sends its bless

[PATCH v6 02/13] firmware: use () to terminate kernel-doc function names

2018-05-08 Thread Luis R. Rodriguez
From: Andres Rodriguez The kernel-doc spec dictates a function name ends in (). Signed-off-by: Andres Rodriguez Acked-by: Randy Dunlap Acked-by: Luis R. Rodriguez [mcgrof: adjust since the wide API rename is not yet merged] Signed-off-by: Luis R. Rodriguez --- drivers/base/firmware_loader/f

[PATCH v6 01/13] firmware: wrap FW_OPT_* into an enum

2018-05-08 Thread Luis R. Rodriguez
From: Andres Rodriguez This should let us associate enum kdoc to these values. While at it, kdocify the fw_opt. Signed-off-by: Andres Rodriguez Acked-by: Luis R. Rodriguez [mcgrof: coding style fixes, merge kdoc with enum move] Signed-off-by: Luis R. Rodriguez --- drivers/base/firmware_loade

Re: [PATCH v6 13/13] Documentation: clarify firmware_class provenance and why we can't rename the module

2018-05-08 Thread Andres Rodriguez
On 2018-05-08 02:12 PM, Luis R. Rodriguez wrote: Clarify the provenance of the firmware loader firmware_class module name and why we cannot rename the module in the future. Signed-off-by: Luis R. Rodriguez --- .../driver-api/firmware/fallback-mechanisms.rst | 9 ++--- 1 file c

[PATCH] scsi: esas2r: fix spelling mistake: "requestss" -> "requests"

2018-05-08 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in esas2r_debug message Signed-off-by: Colin Ian King --- drivers/scsi/esas2r/esas2r_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/esas2r/esas2r_ioctl.c b/drivers/scsi/esas2r/esas2r_ioctl.c index 9

Re: [PATCH v6 05/13] firmware_loader: enhance Kconfig documentation over FW_LOADER

2018-05-08 Thread Kees Cook
On Tue, May 8, 2018 at 11:12 AM, Luis R. Rodriguez wrote: > If you try to read FW_LOADER today it speaks of old riddles and > unless you have been following development closely you will loose Typo: lose > track of what is what. Even the documentation for PREVENT_FIRMWARE_BUILD > is a bit fuzzy a

Re: [PATCH v6 00/13] firmware_loader changes for v4.18

2018-05-08 Thread Kees Cook
one ahead > and also queued up a few minor fixes for the firmware loader documentation > which have come up recently. These changes are available on my git tree > both based on linux-next [0] and Linus' latest tree [1]. Folks working > on new developments for the firmware loader ca

Re: [PATCH] scsi: mpt3sas: fix a missing-check bug

2018-05-08 Thread Wenwen Wang
Hello Could you please review this patch? We need a confirmation because we are working on an approaching deadline. Thanks! Wenwen On Sat, May 5, 2018 at 1:31 AM, Wenwen Wang wrote: > In _ctl_ioctl_main(), 'ioctl_header' is first copied from the userspace > pointer 'arg'. 'ioctl_header.ioc_numb