aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-01-26cifs: Fix return value in __update_cache_entryYueHaibing1-1/+1
copy_ref_data() may return error, it should be returned to upstream caller. Fixes: 03535b72873b ("cifs: Avoid doing network I/O while holding cache lock") Signed-off-by: YueHaibing <[email protected]> Signed-off-by: Steve French <[email protected]>
2020-01-26cifs: Avoid doing network I/O while holding cache lockPaulo Alcantara (SUSE)1-264/+283
When creating or updating a cache entry, we need to get an DFS referral (get_dfs_referral), so avoid holding any locks during such network operation. To prevent that, do the following: * change cache hashtable sync method from RCU sync to a read/write lock. * use GFP_ATOMIC in memory allocations. Signed-off-by: Paulo Alcantara (SUSE) <[email protected]> Signed-off-by: Steve French <[email protected]>
2020-01-26cifs: Fix potential deadlock when updating vol in cifs_reconnect()Paulo Alcantara (SUSE)1-32/+77
We can't acquire volume lock while refreshing the DFS cache because cifs_reconnect() may call dfs_cache_update_vol() while we are walking through the volume list. To prevent that, make vol_info refcounted, create a temp list with all volumes eligible for refreshing, and then use it without any locks held. Besides, replace vol_lock with a spinlock and protect cache_ttl from concurrent accesses or changes. Signed-off-by: Paulo Alcantara (SUSE) <[email protected]> Signed-off-by: Steve French <[email protected]>
2020-01-26cifs: Merge is_path_valid() into get_normalized_path()Paulo Alcantara (SUSE)1-17/+4
Just do the trivial path validation in get_normalized_path(). Signed-off-by: Paulo Alcantara (SUSE) <[email protected]> Reviewed-by: Aurelien Aptel <[email protected]> Signed-off-by: Steve French <[email protected]>
2020-01-26cifs: Introduce helpers for finding TCP connectionPaulo Alcantara (SUSE)1-13/+31
Add helpers for finding TCP connections that are good candidates for being used by DFS refresh worker. Signed-off-by: Paulo Alcantara (SUSE) <[email protected]> Reviewed-by: Aurelien Aptel <[email protected]> Signed-off-by: Steve French <[email protected]>
2020-01-26cifs: Get rid of kstrdup_const()'d pathsPaulo Alcantara (SUSE)1-3/+3
The DFS cache API is mostly used with heap allocated strings. Signed-off-by: Paulo Alcantara (SUSE) <[email protected]> Reviewed-by: Aurelien Aptel <[email protected]> Signed-off-by: Steve French <[email protected]>
2020-01-26cifs: Clean up DFS referral cachePaulo Alcantara (SUSE)1-286/+279
Do some renaming and code cleanup. No functional changes. Signed-off-by: Paulo Alcantara (SUSE) <[email protected]> Reviewed-by: Aurelien Aptel <[email protected]> Signed-off-by: Steve French <[email protected]>
2020-01-26cifs: Don't use iov_iter::type directlyDavid Howells1-4/+4
Don't use iov_iter::type directly, but rather use the new accessor functions that have been added. This allows the .type field to be split and rearranged without the need to update the filesystems. Signed-off-by: David Howells <[email protected]> Signed-off-by: Steve French <[email protected]>
2020-01-26cifs: set correct max-buffer-size for smb2_ioctl_init()Ronnie Sahlberg1-2/+7
Fix two places where we need to adjust down the max response size for ioctl when it is used together with compounding. Signed-off-by: Ronnie Sahlberg <[email protected]> Signed-off-by: Steve French <[email protected]> Reviewed-by: Pavel Shilovsky <[email protected]> CC: Stable <[email protected]>
2020-01-26cifs: use compounding for open and first query-dir for readdir()Ronnie Sahlberg2-12/+87
Combine the initial SMB2_Open and the first SMB2_Query_Directory in a compound. This shaves one round-trip of each directory listing, changing it from 4 to 3 for small directories. Signed-off-by: Ronnie Sahlberg <[email protected]> Signed-off-by: Steve French <[email protected]> Reviewed-by: Pavel Shilovsky <[email protected]>
2020-01-26cifs: create a helper function to parse the query-directory response bufferRonnie Sahlberg1-46/+63
Signed-off-by: Ronnie Sahlberg <[email protected]> Signed-off-by: Steve French <[email protected]> Reviewed-by: Pavel Shilovsky <[email protected]>
2020-01-26cifs: prepare SMB2_query_directory to be used with compoundingRonnie Sahlberg3-36/+82
Signed-off-by: Ronnie Sahlberg <[email protected]> Signed-off-by: Steve French <[email protected]> Reviewed-by: Pavel Shilovsky <[email protected]>
2020-01-26fs/cifs/cifssmb.c: use true,false for bool variablezhengbin1-2/+2
Fixes coccicheck warning: fs/cifs/cifssmb.c:4622:3-22: WARNING: Assignment of 0/1 to bool variable fs/cifs/cifssmb.c:4756:3-22: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot <[email protected]> Signed-off-by: zhengbin <[email protected]> Signed-off-by: Steve French <[email protected]>
2020-01-26fs/cifs/smb2ops.c: use true,false for bool variablezhengbin1-1/+1
Fixes coccicheck warning: fs/cifs/smb2ops.c:807:2-36: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot <[email protected]> Signed-off-by: zhengbin <[email protected]> Signed-off-by: Steve French <[email protected]>
2020-01-26Linux 5.5Linus Torvalds1-1/+1
2020-01-26Merge tag 'io_uring-5.5-2020-01-26' of git://git.kernel.dk/linux-blockLinus Torvalds1-10/+0
Pull io_uring fixes from Jens Axboe: "Fix for two regressions in this cycle, both reported by the postgresql use case. One removes the added restriction on who can submit IO, making it possible for rings shared across forks to do so. The other fixes an issue for the same kind of use case, where one exiting process would cancel all IO" * tag 'io_uring-5.5-2020-01-26' of git://git.kernel.dk/linux-block: io_uring: don't cancel all work on process exit Revert "io_uring: only allow submit from owning task"
2020-01-26Merge tag 'block-5.5-2020-01-26' of git://git.kernel.dk/linux-blockLinus Torvalds3-8/+39
Pull block fix from Jens Axboe: "Unfortunately this weekend we had a few last minute reports, one was for block. The partition disable for zoned devices was overly restrictive, it can work (and be supported) just fine for host-aware variants. Here's a fix ensuring that's the case so we don't break existing users of that" * tag 'block-5.5-2020-01-26' of git://git.kernel.dk/linux-block: block: allow partitions on host aware zone devices
2020-01-26Merge tag 'scsi-fixes' of ↵Linus Torvalds3-15/+6
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Two last minute fixes, both in drivers. The fnic one is a highly unlikely condition, but the RDMA one is a recently introduced regression that causes a kernel warning to trigger in every RDMA logon, which would be unsightly if it got into the final release" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: RDMA/isert: Fix a recently introduced regression related to logout scsi: fnic: do not queue commands during fwreset
2020-01-26Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfsLinus Torvalds1-7/+10
Pull vfs fix from Al Viro: "Fix a use-after-free in do_last() handling of sysctl_protected_... checks. The use-after-free normally doesn't happen there, but race with rename() and it becomes possible" * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: do_last(): fetch directory ->i_mode and ->i_uid before it's too late
2020-01-26io_uring: don't cancel all work on process exitJens Axboe1-4/+0
If we're sharing the ring across forks, then one process exiting means that we cancel ALL work and prevent future work. This is overly restrictive. As long as we cancel the work associated with the files from the current task, it's safe to let others persist. Normal fd close on exit will still wait (and cancel) pending work. Fixes: fcb323cc53e2 ("io_uring: io_uring: add support for async work inheriting files") Reported-by: Andres Freund <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2020-01-26block: allow partitions on host aware zone devicesChristoph Hellwig3-8/+39
Host-aware SMR drives can be used with the commands to explicitly manage zone state, but they can also be used as normal disks. In the former case it makes perfect sense to allow partitions on them, in the latter it does not, just like for host managed devices. Add a check to add_partition to allow partitions on host aware devices, but give up any zone management capabilities in that case, which also catches the previously missed case of adding a partition vs just scanning it. Because sd can rescan the attribute at runtime it needs to check if a disk has partitions, for which a new helper is added to genhd.h. Fixes: 5eac3eb30c9a ("block: Remove partition support for zoned block devices") Reported-by: Borislav Petkov <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Tested-by: Damien Le Moal <[email protected]> Reviewed-by: Damien Le Moal <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2020-01-26Revert "io_uring: only allow submit from owning task"Jens Axboe1-6/+0
This ends up being too restrictive for tasks that willingly fork and share the ring between forks. Andres reports that this breaks his postgresql work. Since we're close to 5.5 release, revert this change for now. Cc: [email protected] Fixes: 44d282796f81 ("io_uring: only allow submit from owning task") Reported-by: Andres Freund <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2020-01-26afs: Fix characters allowed into cell namesDavid Howells1-1/+10
The afs filesystem needs to prohibit certain characters from cell names, such as '/', as these are used to form filenames in procfs, leading to the following warning being generated: WARNING: CPU: 0 PID: 3489 at fs/proc/generic.c:178 Fix afs_alloc_cell() to disallow nonprintable characters, '/', '@' and names that begin with a dot. Remove the check for "@cell" as that is then redundant. This can be tested by running: echo add foo/.bar 1.2.3.4 >/proc/fs/afs/cells Note that we will also need to deal with: - Names ending in ".invalid" shouldn't be passed to the DNS. - Names that contain non-valid domainname chars shouldn't be passed to the DNS. - DNS replies that say "your-dns-needs-immediate-attention.<gTLD>" and replies containing A records that say 127.0.53.53 should be considered invalid. [https://www.icann.org/en/system/files/files/name-collision-mitigation-01aug14-en.pdf] but these need to be dealt with by the kafs-client DNS program rather than the kernel. Reported-by: [email protected] Cc: [email protected] Signed-off-by: David Howells <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2020-01-26Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.gitKalle Valo25-105/+346
ath.git patches for v5.6. Major changes: ar5523 * add support for SMCWUSBT-G2 USB device
2020-01-26iwlegacy: ensure loop counter addr does not wrap and cause an infinite loopColin Ian King1-1/+1
The loop counter addr is a u16 where as the upper limit of the loop is an int. In the unlikely event that the il->cfg->eeprom_size is greater than 64K then we end up with an infinite loop since addr will wrap around an never reach upper loop limit. Fix this by making addr an int. Addresses-Coverity: ("Infinite loop") Fixes: be663ab67077 ("iwlwifi: split the drivers for agn and legacy devices 3945/4965") Signed-off-by: Colin Ian King <[email protected]> Acked-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2020-01-26rtlwifi: btcoex: fix spelling mistake "initilized" -> "initialized"Colin Ian King3-3/+3
There is a spelling mistake in one of the fields in the btc_coexist struct, fix it. Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2020-01-26rtlwifi: rtl8723ae: remove unused variablesYueHaibing1-112/+0
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/dm.c:16:18: warning: ofdmswing_table defined but not used [-Wunused-const-variable=] drivers/net/wireless/realtek/rtlwifi/rtl8723ae/dm.c:56:17: warning: cckswing_table_ch1ch13 defined but not used [-Wunused-const-variable=] drivers/net/wireless/realtek/rtlwifi/rtl8723ae/dm.c:92:17: warning: cckswing_table_ch14 defined but not used [-Wunused-const-variable=] These variable is never used, so remove them. Reported-by: Hulk Robot <[email protected]> Signed-off-by: YueHaibing <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2020-01-26rtlwifi: rtl8192ee: remove unused variablesYueHaibing1-118/+0
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/dm.c:15:18: warning: ofdmswing_table defined but not used [-Wunused-const-variable=] drivers/net/wireless/realtek/rtlwifi/rtl8192ee/dm.c:61:17: warning: cckswing_table_ch1ch13 defined but not used [-Wunused-const-variable=] drivers/net/wireless/realtek/rtlwifi/rtl8192ee/dm.c:97:17: warning: cckswing_table_ch14 defined but not used [-Wunused-const-variable=] These variable is never used, so remove them. Reported-by: Hulk Robot <[email protected]> Signed-off-by: YueHaibing <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2020-01-26rtlwifi: rtl8821ae: remove unused variablesYueHaibing1-118/+0
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c:142:17: warning: cckswing_table_ch1ch13 defined but not used [-Wunused-const-variable=] drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c:178:17: warning: cckswing_table_ch14 defined but not used [-Wunused-const-variable=] drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c:96:18: warning: ofdmswing_table defined but not used [-Wunused-const-variable=] These variable is never used, so remove them. Reported-by: Hulk Robot <[email protected]> Signed-off-by: YueHaibing <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2020-01-26rtlwifi: rtl8188ee: remove redundant assignment to variable condColin Ian King1-1/+1
Variable cond is being assigned with a value that is never read, it is assigned a new value later on. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <[email protected]> Acked-by: Ping-Ke Shih <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2020-01-26qtnfmac: add support for TWT responder and spatial reuseMikhail Karpenko2-1/+53
Add support for 11ax features: TWT responder and spatial reuse. Add separate structure for spatial reuse parameters and pass this structure to firmware along with other parameters in start_ap command. Pass TWT responder value to firmware. Bump qlink protocol version. Signed-off-by: Mikhail Karpenko <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2020-01-26qtnfmac: add support for STA HE ratesSergey Matyukevich2-0/+3
Add HE rates into STA info. Report HE Rx/Tx MCS if STA supports them. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2020-01-26qtnfmac: control qtnfmac wireless interfaces bridgingSergey Matyukevich1-18/+34
Bridging qtnfmac interfaces is possible only if the following two conditions are fulfilled: - firmware advertises proper support with QLINK_HW_CAPAB_HW_BRIDGE - kernel is built with CONFIG_NET_SWITCHDEV support Otherwise adding qtnfmac wireless interfaces into the same bridge should not be allowed since packets flooded by kernel may break internal forwarding rules between interfaces. This patch disables adding qtnfmac wireless interfaces into the same bridge if no support is provided either by card or by kernel. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2020-01-26qtnfmac: add module param to configure DFS offloadSergey Matyukevich6-7/+22
Firmware may support DFS offload. However the final decision on whether to use it or not should be up to the user. So even if firmware supports DFS offload, it should be enabled only if user explicitly requests it. For this purpose introduce kernel param dfs_offload which is disabled by default. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2020-01-26qtnfmac: cleanup slave_radar access functionSergey Matyukevich3-7/+7
Currently this parameter is global, it is not specific to mac. So this function does not need any input parameters. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2020-01-26brcmfmac: Remove always false 'idx < 0' statementyuehaibing1-1/+1
idx is declared as u32, it will never less than 0. Signed-off-by: yuehaibing <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2020-01-26rtw88: use shorter delay time to poll PS stateYan-Hsuan Chuang1-2/+2
When TX packet arrives, driver should leave deep PS state to make sure the DMA is working. After requested to leave deep PS state, driver needs to poll the PS state to check if the mode has been changed successfully. The driver used to check the state of the hardware every 20 msecs, which means upon the first failure of state check, the CPU is delayed 20 msecs for next check. This is harmful for some time-sensitive applications such as media players. So, use shorter delay time each check from 20 msecs to 100 usecs. The state should be changed in several tries. But we still need to reserve ~15 msecs in total in case of the state just took too long to be changed successfully. If the states of driver and the hardware is not synchronized, the power state could be locked forever, which mean we could never enter/leave the PS state. Signed-off-by: Yan-Hsuan Chuang <[email protected]> Reviewed-by: Chris Chiu <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2020-01-26rtw88: fix potential NULL skb access in TX ISRYan-Hsuan Chuang1-0/+5
Sometimes the TX queue may be empty and we could possible dequeue a NULL pointer, crash the kernel. If the skb is NULL then there is nothing to do, just leave the ISR. And the TX queue should not be empty here, so print an error to see if there is anything wrong for DMA ring. Fixes: e3037485c68e ("rtw88: new Realtek 802.11ac driver") Signed-off-by: Yan-Hsuan Chuang <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2020-01-26brcmfmac: add initial support for monitor modeRafał Miłecki6-13/+174
Report monitor interface availability using cfg80211 and support it in the add_virtual_intf() and del_virtual_intf() callbacks. This new feature is conditional and depends on firmware flagging monitor packets. Receiving monitor frames is already handled by the brcmf_netif_mon_rx(). Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2020-01-26brcmfmac: simplify building interface combinationsRafał Miłecki1-29/+14
Move similar/duplicated code out of combination specific code blocks. This simplifies code a bit and allows adding more combinations later. A list of combinations remains unchanged. Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2020-01-26brcmfmac: sdio: Fix OOB interrupt initialization on brcm43362Jean-Philippe Brucker1-6/+6
Commit 262f2b53f679 ("brcmfmac: call brcmf_attach() just before calling brcmf_bus_started()") changed the initialization order of the brcmfmac SDIO driver. Unfortunately since brcmf_sdiod_intr_register() is now called before the sdiodev->bus_if initialization, it reads the wrong chip ID and fails to initialize the GPIO on brcm43362. Thus the chip cannot send interrupts and fails to probe: [ 12.517023] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout [ 12.531214] ieee80211 phy0: brcmf_bus_started: failed: -110 [ 12.536976] ieee80211 phy0: brcmf_attach: dongle is not responding: err=-110 [ 12.566467] brcmfmac: brcmf_sdio_firmware_callback: brcmf_attach failed Initialize the bus interface earlier to ensure that brcmf_sdiod_intr_register() properly sets up the OOB interrupt. BugLink: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=908438 Fixes: 262f2b53f679 ("brcmfmac: call brcmf_attach() just before calling brcmf_bus_started()") Signed-off-by: Jean-Philippe Brucker <[email protected]> Reviewed-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2020-01-26brcmfmac: use true,false for bool variablezhengbin1-1/+1
Fixes coccicheck warning: drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c:911:2-24: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot <[email protected]> Signed-off-by: zhengbin <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2020-01-26cw1200: use true,false for bool variablezhengbin1-1/+1
Fixes coccicheck warning: drivers/net/wireless/st/cw1200/txrx.c:718:6-16: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot <[email protected]> Signed-off-by: zhengbin <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2020-01-26rtw88: use true,false for bool variablezhengbin1-1/+1
Fixes coccicheck warning: drivers/net/wireless/realtek/rtw88/phy.c:1437:1-24: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot <[email protected]> Signed-off-by: zhengbin <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2020-01-26rtlwifi: rtl8821ae: Make functions static & rm sw.hAmadeusz Sławiński2-16/+3
Some of functions which were exposed in sw.h, are only used in sw.c, so just make them static. This makes sw.h unnecessary, so remove it. Signed-off-by: Amadeusz Sławiński <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2020-01-26rtlwifi: rtl8723be: Make functions static & rm sw.hAmadeusz Sławiński2-17/+3
Some of functions which were exposed in sw.h, are only used in sw.c, so just make them static. This makes sw.h unnecessary, so remove it. Signed-off-by: Amadeusz Sławiński <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2020-01-26rtlwifi: rtl8723ae: Make functions static & rm sw.hAmadeusz Sławiński2-17/+3
Some of functions which were exposed in sw.h, are only used in sw.c, so just make them static. This makes sw.h unnecessary, so remove it. Signed-off-by: Amadeusz Sławiński <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2020-01-26rtlwifi: rtl8192se: Remove sw.h headerAmadeusz Sławiński2-14/+0
It has one define, which is already defined in include from reg.h. All the declared functions are not implemented anywhere, sw.c has ones with similar names which are already static. Signed-off-by: Amadeusz Sławiński <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2020-01-26rtlwifi: rtl8192ee: Make functions static & rm sw.hAmadeusz Sławiński2-15/+3
Some of functions which were exposed in sw.h, are only used in sw.c, so just make them static. This makes sw.h unnecessary, so remove it. Signed-off-by: Amadeusz Sławiński <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2020-01-26rtlwifi: rtl8192cu: Remove sw.h headerAmadeusz Sławiński2-28/+0
It has one define, which is already defined in include from reg.h. All functions are declared in their own headers and included in *.c files belonging to them. This makes sw.h unnecessary, so we can remove it. Signed-off-by: Amadeusz Sławiński <[email protected]> Signed-off-by: Kalle Valo <[email protected]>