From fec947a12826edde69549b84a5526ac626536a5f Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 12 Jan 2015 07:22:03 -0800 Subject: [PATCH] 3.10-stable patches added patches: ath9k-fix-be-bk-queue-order.patch ath9k_hw-fix-hardware-queue-allocation.patch ocfs2-fix-journal-commit-deadlock.patch --- queue-3.10/ath9k-fix-be-bk-queue-order.patch | 33 ++++++++ ...h9k_hw-fix-hardware-queue-allocation.patch | 40 +++++++++ .../ocfs2-fix-journal-commit-deadlock.patch | 84 +++++++++++++++++++ queue-3.10/series | 3 + queue-3.14/series | 6 ++ queue-3.18/series | 8 ++ 6 files changed, 174 insertions(+) create mode 100644 queue-3.10/ath9k-fix-be-bk-queue-order.patch create mode 100644 queue-3.10/ath9k_hw-fix-hardware-queue-allocation.patch create mode 100644 queue-3.10/ocfs2-fix-journal-commit-deadlock.patch create mode 100644 queue-3.10/series create mode 100644 queue-3.14/series create mode 100644 queue-3.18/series diff --git a/queue-3.10/ath9k-fix-be-bk-queue-order.patch b/queue-3.10/ath9k-fix-be-bk-queue-order.patch new file mode 100644 index 00000000000..35cf08aa083 --- /dev/null +++ b/queue-3.10/ath9k-fix-be-bk-queue-order.patch @@ -0,0 +1,33 @@ +From 78063d81d353e10cbdd279c490593113b8fdae1c Mon Sep 17 00:00:00 2001 +From: Felix Fietkau +Date: Sun, 30 Nov 2014 20:38:41 +0100 +Subject: ath9k: fix BE/BK queue order + +From: Felix Fietkau + +commit 78063d81d353e10cbdd279c490593113b8fdae1c upstream. + +Hardware queues are ordered by priority. Use queue index 0 for BK, which +has lower priority than BE. + +Signed-off-by: Felix Fietkau +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/ath/ath9k/hw.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/net/wireless/ath/ath9k/hw.h ++++ b/drivers/net/wireless/ath/ath9k/hw.h +@@ -215,8 +215,8 @@ + #define AH_WOW_BEACON_MISS BIT(3) + + enum ath_hw_txq_subtype { +- ATH_TXQ_AC_BE = 0, +- ATH_TXQ_AC_BK = 1, ++ ATH_TXQ_AC_BK = 0, ++ ATH_TXQ_AC_BE = 1, + ATH_TXQ_AC_VI = 2, + ATH_TXQ_AC_VO = 3, + }; diff --git a/queue-3.10/ath9k_hw-fix-hardware-queue-allocation.patch b/queue-3.10/ath9k_hw-fix-hardware-queue-allocation.patch new file mode 100644 index 00000000000..1f24559f259 --- /dev/null +++ b/queue-3.10/ath9k_hw-fix-hardware-queue-allocation.patch @@ -0,0 +1,40 @@ +From ad8fdccf9c197a89e2d2fa78c453283dcc2c343f Mon Sep 17 00:00:00 2001 +From: Felix Fietkau +Date: Sun, 30 Nov 2014 20:38:40 +0100 +Subject: ath9k_hw: fix hardware queue allocation + +From: Felix Fietkau + +commit ad8fdccf9c197a89e2d2fa78c453283dcc2c343f upstream. + +The driver passes the desired hardware queue index for a WMM data queue +in qinfo->tqi_subtype. This was ignored in ath9k_hw_setuptxqueue, which +instead relied on the order in which the function is called. + +Reported-by: Hubert Feurstein +Signed-off-by: Felix Fietkau +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/ath/ath9k/mac.c | 9 +-------- + 1 file changed, 1 insertion(+), 8 deletions(-) + +--- a/drivers/net/wireless/ath/ath9k/mac.c ++++ b/drivers/net/wireless/ath/ath9k/mac.c +@@ -311,14 +311,7 @@ int ath9k_hw_setuptxqueue(struct ath_hw + q = ATH9K_NUM_TX_QUEUES - 3; + break; + case ATH9K_TX_QUEUE_DATA: +- for (q = 0; q < ATH9K_NUM_TX_QUEUES; q++) +- if (ah->txq[q].tqi_type == +- ATH9K_TX_QUEUE_INACTIVE) +- break; +- if (q == ATH9K_NUM_TX_QUEUES) { +- ath_err(common, "No available TX queue\n"); +- return -1; +- } ++ q = qinfo->tqi_subtype; + break; + default: + ath_err(common, "Invalid TX queue type: %u\n", type); diff --git a/queue-3.10/ocfs2-fix-journal-commit-deadlock.patch b/queue-3.10/ocfs2-fix-journal-commit-deadlock.patch new file mode 100644 index 00000000000..3d55c501d0f --- /dev/null +++ b/queue-3.10/ocfs2-fix-journal-commit-deadlock.patch @@ -0,0 +1,84 @@ +From 136f49b9171074872f2a14ad0ab10486d1ba13ca Mon Sep 17 00:00:00 2001 +From: Junxiao Bi +Date: Thu, 18 Dec 2014 16:17:37 -0800 +Subject: ocfs2: fix journal commit deadlock + +From: Junxiao Bi + +commit 136f49b9171074872f2a14ad0ab10486d1ba13ca upstream. + +For buffer write, page lock will be got in write_begin and released in +write_end, in ocfs2_write_end_nolock(), before it unlock the page in +ocfs2_free_write_ctxt(), it calls ocfs2_run_deallocs(), this will ask +for the read lock of journal->j_trans_barrier. Holding page lock and +ask for journal->j_trans_barrier breaks the locking order. + +This will cause a deadlock with journal commit threads, ocfs2cmt will +get write lock of journal->j_trans_barrier first, then it wakes up +kjournald2 to do the commit work, at last it waits until done. To +commit journal, kjournald2 needs flushing data first, it needs get the +cache page lock. + +Since some ocfs2 cluster locks are holding by write process, this +deadlock may hung the whole cluster. + +unlock pages before ocfs2_run_deallocs() can fix the locking order, also +put unlock before ocfs2_commit_trans() to make page lock is unlocked +before j_trans_barrier to preserve unlocking order. + +Signed-off-by: Junxiao Bi +Reviewed-by: Wengang Wang +Reviewed-by: Mark Fasheh +Cc: Joel Becker +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + fs/ocfs2/aops.c | 16 ++++++++++++++-- + 1 file changed, 14 insertions(+), 2 deletions(-) + +--- a/fs/ocfs2/aops.c ++++ b/fs/ocfs2/aops.c +@@ -917,7 +917,7 @@ void ocfs2_unlock_and_free_pages(struct + } + } + +-static void ocfs2_free_write_ctxt(struct ocfs2_write_ctxt *wc) ++static void ocfs2_unlock_pages(struct ocfs2_write_ctxt *wc) + { + int i; + +@@ -938,7 +938,11 @@ static void ocfs2_free_write_ctxt(struct + page_cache_release(wc->w_target_page); + } + ocfs2_unlock_and_free_pages(wc->w_pages, wc->w_num_pages); ++} + ++static void ocfs2_free_write_ctxt(struct ocfs2_write_ctxt *wc) ++{ ++ ocfs2_unlock_pages(wc); + brelse(wc->w_di_bh); + kfree(wc); + } +@@ -2060,11 +2064,19 @@ out_write_size: + di->i_mtime_nsec = di->i_ctime_nsec = cpu_to_le32(inode->i_mtime.tv_nsec); + ocfs2_journal_dirty(handle, wc->w_di_bh); + ++ /* unlock pages before dealloc since it needs acquiring j_trans_barrier ++ * lock, or it will cause a deadlock since journal commit threads holds ++ * this lock and will ask for the page lock when flushing the data. ++ * put it here to preserve the unlock order. ++ */ ++ ocfs2_unlock_pages(wc); ++ + ocfs2_commit_trans(osb, handle); + + ocfs2_run_deallocs(osb, &wc->w_dealloc); + +- ocfs2_free_write_ctxt(wc); ++ brelse(wc->w_di_bh); ++ kfree(wc); + + return copied; + } diff --git a/queue-3.10/series b/queue-3.10/series new file mode 100644 index 00000000000..d25040293f3 --- /dev/null +++ b/queue-3.10/series @@ -0,0 +1,3 @@ +ocfs2-fix-journal-commit-deadlock.patch +ath9k_hw-fix-hardware-queue-allocation.patch +ath9k-fix-be-bk-queue-order.patch diff --git a/queue-3.14/series b/queue-3.14/series new file mode 100644 index 00000000000..b03287bf661 --- /dev/null +++ b/queue-3.14/series @@ -0,0 +1,6 @@ +drivers-rtc-rtc-sirfsoc.c-move-hardware-initilization-earlier-in-probe.patch +drivers-rtc-rtc-isl12057.c-fix-masking-of-register-values.patch +ocfs2-fix-journal-commit-deadlock.patch +ocfs2-fix-the-wrong-directory-passed-to-ocfs2_lookup_ino_from_name-when-link-file.patch +ath9k_hw-fix-hardware-queue-allocation.patch +ath9k-fix-be-bk-queue-order.patch diff --git a/queue-3.18/series b/queue-3.18/series new file mode 100644 index 00000000000..de3862758fb --- /dev/null +++ b/queue-3.18/series @@ -0,0 +1,8 @@ +drivers-rtc-rtc-sirfsoc.c-move-hardware-initilization-earlier-in-probe.patch +rtc-omap-fix-clock-source-configuration.patch +rtc-omap-fix-missing-wakealarm-attribute.patch +drivers-rtc-rtc-isl12057.c-fix-masking-of-register-values.patch +ocfs2-fix-journal-commit-deadlock.patch +ocfs2-fix-the-wrong-directory-passed-to-ocfs2_lookup_ino_from_name-when-link-file.patch +ath9k_hw-fix-hardware-queue-allocation.patch +ath9k-fix-be-bk-queue-order.patch -- 2.47.3