aboutsummaryrefslogtreecommitdiffstats
path: root/mm (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2019-10-27dt-bindings: iio: imu: st_lsm6dsx: add lsm6dsrx device bindingsLorenzo Bianconi1-0/+1
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-10-27iio: imu: st_lsm6dsx: add support to LSM6DSRXLorenzo Bianconi6-5/+21
Add support to STM LSM6DSRX 6-axis (acc + gyro) Mems sensor https://www.st.com/resource/en/datasheet/lsm6dsrx.pdf Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-10-27iio: st: Drop GPIO includeLinus Walleij4-4/+0
None of the ST sensor drivers use any symbols from <linux/gpio.h>, just drop the include from all of them. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-10-27staging: rtl8712: Remove lines before a close braceCristiane Naves1-2/+0
Fix Blank lines aren't necessary before a close brace '}'. Issue found by checkpatch. Signed-off-by: Cristiane Naves <cristianenavescardoso09@gmail.com> Link: https://lore.kernel.org/r/8c74dcd9afaa528a80804081f582792045bb7a7a.1572121059.git.cristianenavescardoso09@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-27staging: fieldbus: anybuss: use devm_platform_ioremap_resource helperCristiane Naves1-6/+2
Use devm_platform_ioremap_resource helper which wraps platform_get_resource() and devm_ioremap_resource() together. Issue found by coccicheck. Signed-off-by: Cristiane Naves <cristianenavescardoso09@gmail.com> Link: https://lore.kernel.org/r/20191026235214.GA11702@cristiane-Inspiron-5420 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-27staging: media: allegro-dvt: remove bool comparisonCristiane Naves1-1/+1
Bool tests don't need comparisons. Issue found by coccicheck. Signed-off-by: Cristiane Naves <cristianenavescardoso09@gmail.com> Link: https://lore.kernel.org/r/20191026231619.GA14093@cristiane-Inspiron-5420 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-27staging: octeon: Remove unneeded variableCristiane Naves1-3/+1
Remove unneeded variable used to store return value. Issue found by coccicheck. Signed-off-by: Cristiane Naves <cristianenavescardoso09@gmail.com> Link: https://lore.kernel.org/r/20191026222453.GA14562@cristiane-Inspiron-5420 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-27staging: gasket: Fix lines ending with a '('Cristiane Naves1-2/+2
Fix lines ending with a '('. Issue found by checkpatch. Signed-off-by: Cristiane Naves <cristianenavescardoso09@gmail.com> Link: https://lore.kernel.org/r/20191026191101.GA8973@cristiane-Inspiron-5420 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26Staging: qlge: Rewrite two while loops as simple for loopsSamuil Ivanov1-6/+4
This is a task from the TODO list of qlge driver: - some "while" loops could be rewritten with simple "for" The change is in functions ql_wait_reg_rdy and ql_wait_cfg in qlge_main.c. The while loops are basically count based (they decrement on each iteration), and it makes more sense to be a for loop construction instead. Signed-off-by: Samuil Ivanov <samuil.ivanovbg@gmail.com> Link: https://lore.kernel.org/r/20191023205855.GA1841@samuil-ThinkCentre-M92P Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26drivers/staging/fbtft/fb_seps525: New driver for SEPS525 (Syncoam) LCD ControllersMichael Hennerich4-0/+229
The SEPS525 is a 160 RGB x 128 Dots, 262K Colors PM-OLED Display Driver and Controller. The controller can be found on the NHD-1.69-160128UGC3 (Newhaven Display International, Inc.). Datasheets: Link: https://www.newhavendisplay.com/appnotes/datasheets/OLEDs/SEPS525.pdf Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Co-developed-by: Beniamin Bia <beniamin.bia@analog.com> Signed-off-by: Beniamin Bia <beniamin.bia@analog.com> Link: https://lore.kernel.org/r/20191017170203.11999-1-beniamin.bia@analog.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: wlan-ng: remove unused field from struct hfa384x_usbctlxTim Collier1-2/+0
The variant field in struct hfa384x_usbctlx is not referenced anywhere in the driver, so remove it. Signed-off-by: Tim Collier <osdevtc@gmail.com> Link: https://lore.kernel.org/r/20191025084126.9181-6-osdevtc@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: wlan-ng: fix compilation for USB debuggingTim Collier1-2/+0
Fix compilation errors (remove references to 2 undefined fields in the URB struct) when DEBUG_USB is defined for the wlan-ng driver. Signed-off-by: Tim Collier <osdevtc@gmail.com> Link: https://lore.kernel.org/r/20191025084126.9181-5-osdevtc@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: wlan-ng: correct parameter alignment in hfa384x.hTim Collier1-1/+1
Realign parameter in function declaration to fix checkpatch.pl warning that parameter needed to be aligned with the opening parenthesis of the declaration. Signed-off-by: Tim Collier <osdevtc@gmail.com> Link: https://lore.kernel.org/r/20191025084126.9181-4-osdevtc@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: wlan-ng: shorten lines over 80 characters in hfa384x.hTim Collier1-4/+10
Shorten several lines reported as over 80 characters by checkpatch.pl. Signed-off-by: Tim Collier <osdevtc@gmail.com> Link: https://lore.kernel.org/r/20191025084126.9181-3-osdevtc@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: wlan-ng: remove unnecessary casts from prism2usb.cTim Collier1-3/+3
usb_get_intfdata returns a void pointer. It is not necessary to explicitly cast to the desired type and removing the casts is consistent with most use of usb_get_intfdata. Signed-off-by: Tim Collier <osdevtc@gmail.com> Link: https://lore.kernel.org/r/20191025084126.9181-2-osdevtc@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: rtl8188eu: reduce indentation level in rtw_alloc_stainfoMichael Straube1-50/+51
Remove else-arm from if-else statement. Move the else code out of the if-else and skip it by adding goto exit to the if block. The exit label was directly after the else-arm, so there is no change in behaviour. Reduces indentation level and clears a line over 80 characters checkpatch warning. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20191026121135.181897-7-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: rtl8188eu: cleanup long lines in rtw_sta_mgt.cMichael Straube1-5/+10
Cleanup lines over 80 characters in rtw_sta_mgt.c by adding line breaks where appropriate. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20191026121135.181897-6-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: rtl8188eu: remove ternary operatorMichael Straube1-2/+2
Instead of using ternary operator to set variable res, use the value of variable match (or the negation) directly to simplify the code and improve readability. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20191026121135.181897-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: rtl8188eu: convert rtw_access_ctrl to return boolMichael Straube2-4/+4
Function rtw_access_ctrl returns boolean values, so change the return type to bool. Also convert the local variables that are used for the return value from u8 to bool. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20191026121135.181897-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: rtl8188eu: rename array bcast_addrMichael Straube1-2/+2
Rename array bcast_addr to be more consistent in variable naming. In other places in this file buffers for broadcast addresses are named bc_addr as well. bcast_addr -> bc_addr Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20191026121135.181897-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: rtl8188eu: convert unsigned char array to u8Michael Straube1-1/+1
Convert array bcast_addr from unsigned char to u8. Clears a line over 80 characters checkpatch warning. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20191026121135.181897-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: rtl8188eu: cleanup comments in rtw_sta_mgt.cMichael Straube1-5/+10
Cleanup comments in rtw_sta_mgt.c to use kernel block comment style and not exceed 80 characters line length. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20191026121135.181897-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: wfx: fix warnings of alignment should match open parenthesisJules Irenge3-8/+10
: Fix warnings of alignment should match open parenthesis. Issue detected by checkpatch tool. Signed-off-by: Jules Irenge <jbi.octave@gmail.com> Link: https://lore.kernel.org/r/20191019140719.2542-6-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: wfx: correct misspelled wordsJules Irenge1-2/+2
Correct misspelled words: retrieved and auxiliary. Issue detected by checkpatch tool. Signed-off-by: Jules Irenge <jbi.octave@gmail.com> Link: https://lore.kernel.org/r/20191019140719.2542-5-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: wfx: fix warnings of logical continuationJules Irenge1-7/+7
Fix check warnings of logical continuations should be on the previous line. Issue detected by checkpatch tool. Signed-off-by: Jules Irenge <jbi.octave@gmail.com> Link: https://lore.kernel.org/r/20191019140719.2542-4-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: wfx: fix warning of line over 80 charactersJules Irenge6-49/+102
Fix warning of lines over 80 characters. Issue detected by checkpatch tool. Signed-off-by: Jules Irenge <jbi.octave@gmail.com> Link: https://lore.kernel.org/r/20191019140719.2542-3-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: wfx: fix warnings of no space is necessaryJules Irenge6-24/+24
Fix warnings of no space is necessary after a cast. Issue detected by checkpatch tool. Signed-off-by: Jules Irenge <jbi.octave@gmail.com> Link: https://lore.kernel.org/r/20191019140719.2542-2-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: wfx: fix number of available tx_policiesJérôme Pouiller1-1/+1
Original API declares 16 tx_policies. But in fact, the 16th is used internally by the firmware. So, only 15 tx_policies are available for driver. Reported-by: Alban Jeantheau <alban.jeantheau@silabs.com> Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191017093954.657-6-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: wfx: fix setting MAC address from DTJérôme Pouiller1-1/+2
MAC address read from chip is unconditionally used even if a MAC address is configured in device tree. Reported-by: Marc Dorval <marc.dorval@silabs.com> Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191017093954.657-5-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: wfx: fix Oops when CONFIG_OF_NET is not setJérôme Pouiller1-1/+1
In most case, of_get_mac_address() return NULL in case of error. However, if CONFIG_OF_NET is not set, it return -ENODEV. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191017093954.657-4-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: wfx: fix CONFIG_MMC=m with CONFIG_WFX=yJérôme Pouiller1-0/+1
If CONFIG_MMC=m and CONFIG_WFX=y, compilation complains with undefined references: drivers/staging/wfx/main.o: In function `wfx_core_init': /linux/drivers/staging/wfx/main.c:488: undefined reference to `sdio_register_driver' drivers/staging/wfx/main.o: In function `wfx_core_exit': /linux/drivers/staging/wfx/main.c:496: undefined reference to `sdio_unregister_driver' drivers/staging/wfx/main.o:(.debug_addr+0x1a8): undefined reference to `sdio_register_driver' drivers/staging/wfx/main.o:(.debug_addr+0x6f0): undefined reference to `sdio_unregister_driver' Indeed, symbols sdio_* are not present in kernel image. This patch disallows CONFIG_WFX=y if CONFIG_MMC=m. This solution impacts users who want to use SPI bus with configuration: CONFIG_WFX=y + CONFIG_SPI=y + CONFIG_MMC=m. However, I think this is a twisted case. So, I think it won't be missed. Reported-by: zhong jiang <zhongjiang@huawei.com> Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191017093954.657-3-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: wfx: relocate wfx_fill_sl_key() in secure_link.hJérôme Pouiller3-29/+10
"Secure link" feature is not available in in-tree driver (because it depends on mbedtls). Thus, secure_link.h only empty functions. Module parameter "slk_key" and associated function wfx_fill_sl_key() had an unjustifiable place in main.c. This patch relocate them to secure_link.h. BTW, content of wfx_fill_sl_key() is now useless. Just keep a warning if user try to use "slk_key" attribute (unsupported by this driver). Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191017093954.657-2-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: wfx: drop module versionJérôme Pouiller3-10/+0
wfx_version.h says that this code is same same than driver 2.3.1 hosted on github: https://github.com/siliconlabs/wfx-linux-driver/tree/2.3.1-public However, it is inaccurate, driver in-tree contains multiple small patches ahead 2.3.1. I prefer to drop this confusing information. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191017093954.657-1-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: rtl8723bs: Change tabs for spacesJavier F. Arias1-3/+3
Change tabs for spaces when they are incorrectly used as separators. Fix suggested by Julia Lawall. Signed-off-by: Javier F. Arias <jarias.linux@gmail.com> Link: https://lore.kernel.org/r/7b06c103665ab7250dded8c5dadc093228eee7b4.1571284318.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: rtl8723bs: Fix function call formatJavier F. Arias1-10/+5
Fix function call format by following the coding style guidelines for argument wrapping in function calls. Issue found by checkpatch. Signed-off-by: Javier F. Arias <jarias.linux@gmail.com> Link: https://lore.kernel.org/r/828984012f4c58f9d10647511f98005e4d1d5184.1571284318.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: rtl8723bs: Fix indentation warningsJavier F. Arias1-2/+2
Fix indentation warnings to improve the code formatting. Issue found by checkpatch. Signed-off-by: Javier F. Arias <jarias.linux@gmail.com> Link: https://lore.kernel.org/r/166ffc747a4212f81d26b03883dbc04d64deed56.1571284318.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: rtl8723bs: Remove commented codeJavier F. Arias1-47/+9
Remove commented code for a cleaner file. Issue found by checkpatch. Signed-off-by: Javier F. Arias <jarias.linux@gmail.com> Link: https://lore.kernel.org/r/61f9b94781eb0ca1c94a5b6b8c37a8c2d0caaca6.1571284318.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: rtl8723bs: Add spaces between operatorsJavier F. Arias1-18/+18
Add spaces between operators for a better readability. Issue found by checkpatch. Signed-off-by: Javier F. Arias <jarias.linux@gmail.com> Link: https://lore.kernel.org/r/4194f2f5a7ed9deeaf3c2a2f2c91081e1f1189c0.1571284318.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: rtl8723bs: Fix lines over 80 charactersJavier F. Arias1-9/+31
Fix lines over 80 characters by wrapping arguments in function calls, improving the format for a better code readability. Issue found by checkpatch. Signed-off-by: Javier F. Arias <jarias.linux@gmail.com> Link: https://lore.kernel.org/r/6a12577f3b95a77e060a2fb60ff17ce94774c076.1571284318.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: rtl8723bs: Replace string with identifierJavier F. Arias1-11/+11
Replace the hardcoded function names with the corresponding predefined identifiers. Issue found by checkpatch. Signed-off-by: Javier F. Arias <jarias.linux@gmail.com> Link: https://lore.kernel.org/r/b2ff6a52a7140480c9fdb6486a6ac6b4eb51203b.1571284318.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-25riscv: cleanup do_trap_breakChristoph Hellwig1-20/+6
If we always compile the get_break_insn_length inline function we can remove the ifdefs and let dead code elimination take care of the warn branch that is now unreadable because the report_bug stub always returns BUG_TRAP_TYPE_BUG. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Anup Patel <anup@brainfault.org> Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
2019-10-25nbd: verify socket is supported during setupMike Christie1-2/+21
nbd requires socket families to support the shutdown method so the nbd recv workqueue can be woken up from its sock_recvmsg call. If the socket does not support the callout we will leave recv works running or get hangs later when the device or module is removed. This adds a check during socket connection/reconnection to make sure the socket being passed in supports the needed callout. Reported-by: syzbot+24c12fa8d218ed26011a@syzkaller.appspotmail.com Fixes: e9e006f5fcf2 ("nbd: fix max number of supported devs") Tested-by: Richard W.M. Jones <rjones@redhat.com> Signed-off-by: Mike Christie <mchristi@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-25ata: libahci_platform: Fix regulator_get_optional() misuseMark Brown1-24/+14
This driver is using regulator_get_optional() to handle all the supplies that it handles, and only ever enables and disables all supplies en masse without ever doing any other configuration of the device to handle missing power. These are clear signs that the API is being misused - it should only be used for supplies that may be physically absent from the system and in these cases the hardware usually needs different configuration if the supply is missing. Instead use normal regualtor_get(), if the supply is not described in DT then the framework will substitute a dummy regulator in so no special handling is needed by the consumer driver. In the case of the PHY regulator the handling in the driver is a hack to deal with integrated PHYs; the supplies are only optional in the sense that that there's some confusion in the code about where they're bound to. From a code point of view they function exactly as normal supplies so can be treated as such. It'd probably be better to model this by instantiating a PHY object for integrated PHYs. Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-25nbd: handle racing with error'ed out commandsJosef Bacik1-0/+6
We hit the following warning in production print_req_error: I/O error, dev nbd0, sector 7213934408 flags 80700 ------------[ cut here ]------------ refcount_t: underflow; use-after-free. WARNING: CPU: 25 PID: 32407 at lib/refcount.c:190 refcount_sub_and_test_checked+0x53/0x60 Workqueue: knbd-recv recv_work [nbd] RIP: 0010:refcount_sub_and_test_checked+0x53/0x60 Call Trace: blk_mq_free_request+0xb7/0xf0 blk_mq_complete_request+0x62/0xf0 recv_work+0x29/0xa1 [nbd] process_one_work+0x1f5/0x3f0 worker_thread+0x2d/0x3d0 ? rescuer_thread+0x340/0x340 kthread+0x111/0x130 ? kthread_create_on_node+0x60/0x60 ret_from_fork+0x1f/0x30 ---[ end trace b079c3c67f98bb7c ]--- This was preceded by us timing out everything and shutting down the sockets for the device. The problem is we had a request in the queue at the same time, so we completed the request twice. This can actually happen in a lot of cases, we fail to get a ref on our config, we only have one connection and just error out the command, etc. Fix this by checking cmd->status in nbd_read_stat. We only change this under the cmd->lock, so we are safe to check this here and see if we've already error'ed this command out, which would indicate that we've completed it as well. Reviewed-by: Mike Christie <mchristi@redhat.com> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-25nbd: protect cmd->status with cmd->lockJosef Bacik1-5/+7
We already do this for the most part, except in timeout and clear_req. For the timeout case we take the lock after we grab a ref on the config, but that isn't really necessary because we're safe to touch the cmd at this point, so just move the order around. For the clear_req cause this is initiated by the user, so again is safe. Reviewed-by: Mike Christie <mchristi@redhat.com> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-25io_uring: fix bad inflight accounting for SETUP_IOPOLL|SETUP_SQTHREADJens Axboe1-12/+32
We currently assume that submissions from the sqthread are successful, and if IO polling is enabled, we use that value for knowing how many completions to look for. But if we overflowed the CQ ring or some requests simply got errored and already completed, they won't be available for polling. For the case of IO polling and SQTHREAD usage, look at the pending poll list. If it ever hits empty then we know that we don't have anymore pollable requests inflight. For that case, simply reset the inflight count to zero. Reported-by: Pavel Begunkov <asml.silence@gmail.com> Reviewed-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-25io_uring: used cached copies of sq->dropped and cq->overflowJens Axboe1-5/+8
We currently use the ring values directly, but that can lead to issues if the application is malicious and changes these values on our behalf. Created in-kernel cached versions of them, and just overwrite the user side when we update them. This is similar to how we treat the sq/cq ring tail/head updates. Reported-by: Pavel Begunkov <asml.silence@gmail.com> Reviewed-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-25ARM: dts: stm32: relax qspi pins slew-rate for stm32mp157Patrice Chotard1-4/+4
Relax qspi pins slew-rate to minimize peak currents. Fixes: 844030057339 ("ARM: dts: stm32: add flash nor support on stm32mp157c eval board") Link: https://lore.kernel.org/r/20191025130122.11407-1-alexandre.torgue@st.com Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com> Signed-off-by: Olof Johansson <olof@lixom.net>
2019-10-25io_uring: Fix race for sqes with userspacePavel Begunkov1-1/+2
io_ring_submit() finalises with 1. io_commit_sqring(), which releases sqes to the userspace 2. Then calls to io_queue_link_head(), accessing released head's sqe Reorder them. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-10-25io_uring: Fix broken links with offloadingPavel Begunkov1-29/+33
io_sq_thread() processes sqes by 8 without considering links. As a result, links will be randomely subdivided. The easiest way to fix it is to call io_get_sqring() inside io_submit_sqes() as do io_ring_submit(). Downsides: 1. This removes optimisation of not grabbing mm_struct for fixed files 2. It submitting all sqes in one go, without finer-grained sheduling with cq processing. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>