Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 5.4-2.3.x-imx to v5.4.98 #257

Merged
merged 26 commits into from
Feb 13, 2021
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
968b1b0
tracing/kprobe: Fix to support kretprobe events on unloaded modules
mhiramat Jan 27, 2021
03d76df
af_key: relax availability checks for skb size calculation
Dec 27, 2020
2654856
regulator: core: avoid regulator_resolve_supply() race condition
Jan 8, 2021
db272cd
mac80211: 160MHz with extended NSS BW in CSA
shaydevel Dec 22, 2020
8b6d501
ASoC: Intel: Skylake: Zero snd_ctl_elem_value
ribalda Jan 21, 2021
a5c70e5
chtls: Fix potential resource leak
SinkFinder Jan 21, 2021
e96d102
pNFS/NFSv4: Try to return invalid layout in pnfs_layout_process()
Jan 21, 2021
589cf15
ASoC: ak4458: correct reset polarity
eliotb Jan 22, 2021
8f630ed
iwlwifi: mvm: skip power command when unbinding vif during CSA
sara-s Jan 15, 2021
01742ad
iwlwifi: mvm: take mutex for calling iwl_mvm_get_sync_time()
jmberg-intel Jan 15, 2021
b301eaf
iwlwifi: pcie: add a NULL check in iwl_pcie_txq_unmap
egrumbach Jan 15, 2021
c82793e
iwlwifi: pcie: fix context info memory leak
jmberg-intel Jan 15, 2021
2fa76f1
iwlwifi: mvm: invalidate IDs of internal stations at mvm start
ggreenma Jan 22, 2021
fa75803
iwlwifi: mvm: guard against device removal in reprobe
jmberg-intel Jan 22, 2021
19b56e8
SUNRPC: Move simple_get_bytes and simple_get_netobj into private header
DaveWysochanskiRH Jan 21, 2021
618b65d
SUNRPC: Handle 0 length opaque XDR object data properly
DaveWysochanskiRH Jan 21, 2021
d1eb418
i2c: mediatek: Move suspend and resume handling to NOIRQ phase
Jan 9, 2021
513fee2
blk-cgroup: Use cond_resched() when destroy blkgs
Jan 28, 2021
8589eda
regulator: Fix lockdep warning resolving supplies
broonie Jan 22, 2021
78e2f71
bpf: Fix 32 bit src register truncation on div/mod
borkmann Feb 9, 2021
848bcb0
Fix unsynchronized access to sev members through svm_register_enc_region
pgonda Jan 27, 2021
a814355
squashfs: add more sanity checks in id lookup
plougher Feb 9, 2021
d78a706
squashfs: add more sanity checks in inode lookup
plougher Feb 9, 2021
3654a0e
squashfs: add more sanity checks in xattr id lookup
plougher Feb 9, 2021
5b9a410
Linux 5.4.98
gregkh Feb 13, 2021
5df3672
Merge tag 'v5.4.98' into 5.4-2.3.x-imx
zandrey Feb 13, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
blk-cgroup: Use cond_resched() when destroy blkgs
[ Upstream commit 6c635ca ]

On !PREEMPT kernel, we can get below softlockup when doing stress
testing with creating and destroying block cgroup repeatly. The
reason is it may take a long time to acquire the queue's lock in
the loop of blkcg_destroy_blkgs(), or the system can accumulate a
huge number of blkgs in pathological cases. We can add a need_resched()
check on each loop and release locks and do cond_resched() if true
to avoid this issue, since the blkcg_destroy_blkgs() is not called
from atomic contexts.

[ 4757.010308] watchdog: BUG: soft lockup - CPU#11 stuck for 94s!
[ 4757.010698] Call trace:
[ 4757.010700]  blkcg_destroy_blkgs+0x68/0x150
[ 4757.010701]  cgwb_release_workfn+0x104/0x158
[ 4757.010702]  process_one_work+0x1bc/0x3f0
[ 4757.010704]  worker_thread+0x164/0x468
[ 4757.010705]  kthread+0x108/0x138

Suggested-by: Tejun Heo <[email protected]>
Signed-off-by: Baolin Wang <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
Baolin Wang authored and gregkh committed Feb 13, 2021
commit 513fee2aee13cc4fd92dbeca0004581860c0ed26
18 changes: 13 additions & 5 deletions block/blk-cgroup.c
Original file line number Diff line number Diff line change
@@ -1089,21 +1089,29 @@ static void blkcg_css_offline(struct cgroup_subsys_state *css)
*/
void blkcg_destroy_blkgs(struct blkcg *blkcg)
{
might_sleep();

spin_lock_irq(&blkcg->lock);

while (!hlist_empty(&blkcg->blkg_list)) {
struct blkcg_gq *blkg = hlist_entry(blkcg->blkg_list.first,
struct blkcg_gq, blkcg_node);
struct request_queue *q = blkg->q;

if (spin_trylock(&q->queue_lock)) {
blkg_destroy(blkg);
spin_unlock(&q->queue_lock);
} else {
if (need_resched() || !spin_trylock(&q->queue_lock)) {
/*
* Given that the system can accumulate a huge number
* of blkgs in pathological cases, check to see if we
* need to rescheduling to avoid softlockup.
*/
spin_unlock_irq(&blkcg->lock);
cpu_relax();
cond_resched();
spin_lock_irq(&blkcg->lock);
continue;
}

blkg_destroy(blkg);
spin_unlock(&q->queue_lock);
}

spin_unlock_irq(&blkcg->lock);