spec cleanup: drop commented out patches
This commit is contained in:
parent
e501d10166
commit
260881f05b
12
kernel.spec
12
kernel.spec
|
@ -54,7 +54,7 @@ Summary: The Linux kernel
|
|||
# For non-released -rc kernels, this will be appended after the rcX and
|
||||
# gitX tags, so a 3 here would become part of release "0.rcX.gitX.3"
|
||||
#
|
||||
%global baserelease 1
|
||||
%global baserelease 2
|
||||
%global fedora_build %{baserelease}
|
||||
|
||||
# base_sublevel is the kernel version we're starting with and patching
|
||||
|
@ -770,9 +770,6 @@ Patch21022: mm-do-not-stall-in-synchronous-compaction-for-THP-allocations.patch
|
|||
Patch21030: be2net-non-member-vlan-pkts-not-received-in-promisco.patch
|
||||
Patch21031: benet-remove-bogus-unlikely-on-vlan-check.patch
|
||||
|
||||
#rhbz 749166
|
||||
Patch21050: xfs-Fix-possible-memory-corruption-in-xfs_readlink.patch
|
||||
|
||||
Patch21070: oom-fix-integer-overflow-of-points.patch
|
||||
|
||||
#rhbz 728607
|
||||
|
@ -792,9 +789,6 @@ Patch21091: bcma-brcmsmac-compat.patch
|
|||
Patch21100: cciss-fix-irqf-shared.patch
|
||||
Patch21101: hpsa-add-irqf-shared.patch
|
||||
|
||||
#rhbz 755154
|
||||
Patch21200: rtlwifi-fix-lps_lock-deadlock.patch
|
||||
|
||||
#rhbz 731365
|
||||
Patch21220: mac80211_offchannel_rework_revert.patch
|
||||
|
||||
|
@ -1305,7 +1299,6 @@ ApplyPatch linux-2.6-i386-nx-emulation.patch
|
|||
ApplyPatch jbd-jbd2-validate-sb-s_first-in-journal_get_superblo.patch
|
||||
|
||||
# xfs
|
||||
#ApplyPatch xfs-Fix-possible-memory-corruption-in-xfs_readlink.patch
|
||||
|
||||
# btrfs
|
||||
|
||||
|
@ -1464,9 +1457,6 @@ ApplyPatch bcma-brcmsmac-compat.patch
|
|||
ApplyPatch cciss-fix-irqf-shared.patch
|
||||
ApplyPatch hpsa-add-irqf-shared.patch
|
||||
|
||||
#rhbz 755154
|
||||
#ApplyPatch rtlwifi-fix-lps_lock-deadlock.patch
|
||||
|
||||
#rhbz 731365
|
||||
ApplyPatch mac80211_offchannel_rework_revert.patch
|
||||
|
||||
|
|
|
@ -1,224 +0,0 @@
|
|||
Path: news.gmane.org!not-for-mail
|
||||
From: Stanislaw Gruszka <sgruszka-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
|
||||
Newsgroups: gmane.linux.kernel.wireless.general
|
||||
Subject: [PATCH v2] rtlwifi: fix lps_lock deadlock
|
||||
Date: Mon, 28 Nov 2011 10:33:40 +0100
|
||||
Lines: 169
|
||||
Approved: news@gmane.org
|
||||
Message-ID: <20111128093339.GC2372@redhat.com>
|
||||
References: <1322219327-23148-1-git-send-email-sgruszka@redhat.com>
|
||||
<4ECFD1BF.4070503@lwfinger.net>
|
||||
<20111128092308.GB2372@redhat.com>
|
||||
NNTP-Posting-Host: lo.gmane.org
|
||||
Mime-Version: 1.0
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
X-Trace: dough.gmane.org 1322472712 10173 80.91.229.12 (28 Nov 2011 09:31:52 GMT)
|
||||
X-Complaints-To: usenet@dough.gmane.org
|
||||
NNTP-Posting-Date: Mon, 28 Nov 2011 09:31:52 +0000 (UTC)
|
||||
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
|
||||
Chaoming Li <chaoming_li-kXabqFNEczNtrwSWzY7KCg@public.gmane.org>
|
||||
To: Larry Finger <Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>,
|
||||
"John W. Linville" <linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
|
||||
Original-X-From: linux-wireless-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Mon Nov 28 10:31:45 2011
|
||||
Return-path: <linux-wireless-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
|
||||
Envelope-to: glkwg-linux-wireless-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
|
||||
Original-Received: from vger.kernel.org ([209.132.180.67])
|
||||
by lo.gmane.org with esmtp (Exim 4.69)
|
||||
(envelope-from <linux-wireless-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
|
||||
id 1RUxYu-0002H1-AY
|
||||
for glkwg-linux-wireless-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Mon, 28 Nov 2011 10:31:44 +0100
|
||||
Original-Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
|
||||
id S1751698Ab1K1Jbm (ORCPT
|
||||
<rfc822;glkwg-linux-wireless@m.gmane.org>);
|
||||
Mon, 28 Nov 2011 04:31:42 -0500
|
||||
Original-Received: from mx1.redhat.com ([209.132.183.28]:62078 "EHLO mx1.redhat.com"
|
||||
rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
|
||||
id S1751434Ab1K1Jbl (ORCPT <rfc822;linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>);
|
||||
Mon, 28 Nov 2011 04:31:41 -0500
|
||||
Original-Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
|
||||
by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pAS9VSak003418
|
||||
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
|
||||
Mon, 28 Nov 2011 04:31:28 -0500
|
||||
Original-Received: from localhost (vpn1-4-194.ams2.redhat.com [10.36.4.194])
|
||||
by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pAS9VQNG013260;
|
||||
Mon, 28 Nov 2011 04:31:27 -0500
|
||||
Content-Disposition: inline
|
||||
In-Reply-To: <20111128092308.GB2372-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
|
||||
User-Agent: Mutt/1.5.20 (2009-12-10)
|
||||
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
|
||||
Original-Sender: linux-wireless-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
|
||||
Precedence: bulk
|
||||
List-ID: <linux-wireless.vger.kernel.org>
|
||||
X-Mailing-List: linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
|
||||
Xref: news.gmane.org gmane.linux.kernel.wireless.general:81657
|
||||
Archived-At: <http://permalink.gmane.org/gmane.linux.kernel.wireless.general/81657>
|
||||
|
||||
rtl_lps_leave can be called from interrupt context, so we have to
|
||||
disable interrupts when taking lps_lock.
|
||||
|
||||
Below is full lockdep info about deadlock:
|
||||
|
||||
[ 93.815269] =================================
|
||||
[ 93.815390] [ INFO: inconsistent lock state ]
|
||||
[ 93.815472] 2.6.41.1-3.offch.fc15.x86_64.debug #1
|
||||
[ 93.815556] ---------------------------------
|
||||
[ 93.815635] inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
|
||||
[ 93.815743] swapper/0 [HC0[0]:SC1[1]:HE1:SE0] takes:
|
||||
[ 93.815832] (&(&rtlpriv->locks.lps_lock)->rlock){+.?...}, at: [<ffffffffa025dad6>] rtl_lps_leave+0x26/0x103 [rtlwifi]
|
||||
[ 93.815947] {SOFTIRQ-ON-W} state was registered at:
|
||||
[ 93.815947] [<ffffffff8108e10d>] __lock_acquire+0x369/0xd0c
|
||||
[ 93.815947] [<ffffffff8108efb3>] lock_acquire+0xf3/0x13e
|
||||
[ 93.815947] [<ffffffff814e981d>] _raw_spin_lock+0x45/0x79
|
||||
[ 93.815947] [<ffffffffa025de34>] rtl_swlps_rf_awake+0x5a/0x76 [rtlwifi]
|
||||
[ 93.815947] [<ffffffffa025aec0>] rtl_op_config+0x12a/0x32a [rtlwifi]
|
||||
[ 93.815947] [<ffffffffa01d614b>] ieee80211_hw_config+0x124/0x129 [mac80211]
|
||||
[ 93.815947] [<ffffffffa01e0af3>] ieee80211_dynamic_ps_disable_work+0x32/0x47 [mac80211]
|
||||
[ 93.815947] [<ffffffff81075aa5>] process_one_work+0x205/0x3e7
|
||||
[ 93.815947] [<ffffffff81076753>] worker_thread+0xda/0x15d
|
||||
[ 93.815947] [<ffffffff8107a119>] kthread+0xa8/0xb0
|
||||
[ 93.815947] [<ffffffff814f3184>] kernel_thread_helper+0x4/0x10
|
||||
[ 93.815947] irq event stamp: 547822
|
||||
[ 93.815947] hardirqs last enabled at (547822): [<ffffffff814ea1a7>] _raw_spin_unlock_irqrestore+0x45/0x61
|
||||
[ 93.815947] hardirqs last disabled at (547821): [<ffffffff814e9987>] _raw_spin_lock_irqsave+0x22/0x8e
|
||||
[ 93.815947] softirqs last enabled at (547790): [<ffffffff810623ed>] _local_bh_enable+0x13/0x15
|
||||
[ 93.815947] softirqs last disabled at (547791): [<ffffffff814f327c>] call_softirq+0x1c/0x30
|
||||
[ 93.815947]
|
||||
[ 93.815947] other info that might help us debug this:
|
||||
[ 93.815947] Possible unsafe locking scenario:
|
||||
[ 93.815947]
|
||||
[ 93.815947] CPU0
|
||||
[ 93.815947] ----
|
||||
[ 93.815947] lock(&(&rtlpriv->locks.lps_lock)->rlock);
|
||||
[ 93.815947] <Interrupt>
|
||||
[ 93.815947] lock(&(&rtlpriv->locks.lps_lock)->rlock);
|
||||
[ 93.815947]
|
||||
[ 93.815947] *** DEADLOCK ***
|
||||
[ 93.815947]
|
||||
[ 93.815947] no locks held by swapper/0.
|
||||
[ 93.815947]
|
||||
[ 93.815947] stack backtrace:
|
||||
[ 93.815947] Pid: 0, comm: swapper Not tainted 2.6.41.1-3.offch.fc15.x86_64.debug #1
|
||||
[ 93.815947] Call Trace:
|
||||
[ 93.815947] <IRQ> [<ffffffff814dfd00>] print_usage_bug+0x1e7/0x1f8
|
||||
[ 93.815947] [<ffffffff8101a849>] ? save_stack_trace+0x2c/0x49
|
||||
[ 93.815947] [<ffffffff8108d55c>] ? print_irq_inversion_bug.part.18+0x1a0/0x1a0
|
||||
[ 93.815947] [<ffffffff8108dc8a>] mark_lock+0x106/0x220
|
||||
[ 93.815947] [<ffffffff8108e099>] __lock_acquire+0x2f5/0xd0c
|
||||
[ 93.815947] [<ffffffff810152af>] ? native_sched_clock+0x34/0x36
|
||||
[ 93.830125] [<ffffffff810152ba>] ? sched_clock+0x9/0xd
|
||||
[ 93.830125] [<ffffffff81080181>] ? sched_clock_local+0x12/0x75
|
||||
[ 93.830125] [<ffffffffa025dad6>] ? rtl_lps_leave+0x26/0x103 [rtlwifi]
|
||||
[ 93.830125] [<ffffffff8108efb3>] lock_acquire+0xf3/0x13e
|
||||
[ 93.830125] [<ffffffffa025dad6>] ? rtl_lps_leave+0x26/0x103 [rtlwifi]
|
||||
[ 93.830125] [<ffffffff814e981d>] _raw_spin_lock+0x45/0x79
|
||||
[ 93.830125] [<ffffffffa025dad6>] ? rtl_lps_leave+0x26/0x103 [rtlwifi]
|
||||
[ 93.830125] [<ffffffff81422467>] ? skb_dequeue+0x62/0x6d
|
||||
[ 93.830125] [<ffffffffa025dad6>] rtl_lps_leave+0x26/0x103 [rtlwifi]
|
||||
[ 93.830125] [<ffffffffa025f677>] _rtl_pci_ips_leave_tasklet+0xe/0x10 [rtlwifi]
|
||||
[ 93.830125] [<ffffffff8106281f>] tasklet_action+0x8d/0xee
|
||||
[ 93.830125] [<ffffffff810629ce>] __do_softirq+0x112/0x25a
|
||||
[ 93.830125] [<ffffffff814f327c>] call_softirq+0x1c/0x30
|
||||
[ 93.830125] [<ffffffff81010bf6>] do_softirq+0x4b/0xa1
|
||||
[ 93.830125] [<ffffffff81062d7d>] irq_exit+0x5d/0xcf
|
||||
[ 93.830125] [<ffffffff814f3b7e>] do_IRQ+0x8e/0xa5
|
||||
[ 93.830125] [<ffffffff814ea533>] common_interrupt+0x73/0x73
|
||||
[ 93.830125] <EOI> [<ffffffff8108b825>] ? trace_hardirqs_off+0xd/0xf
|
||||
[ 93.830125] [<ffffffff812bb6d5>] ? intel_idle+0xe5/0x10c
|
||||
[ 93.830125] [<ffffffff812bb6d1>] ? intel_idle+0xe1/0x10c
|
||||
[ 93.830125] [<ffffffff813f8d5e>] cpuidle_idle_call+0x11c/0x1fe
|
||||
[ 93.830125] [<ffffffff8100e2ef>] cpu_idle+0xab/0x101
|
||||
[ 93.830125] [<ffffffff814c6373>] rest_init+0xd7/0xde
|
||||
[ 93.830125] [<ffffffff814c629c>] ? csum_partial_copy_generic+0x16c/0x16c
|
||||
[ 93.830125] [<ffffffff81d4bbb0>] start_kernel+0x3dd/0x3ea
|
||||
[ 93.830125] [<ffffffff81d4b2c4>] x86_64_start_reservations+0xaf/0xb3
|
||||
[ 93.830125] [<ffffffff81d4b140>] ? early_idt_handlers+0x140/0x140
|
||||
[ 93.830125] [<ffffffff81d4b3ca>] x86_64_start_kernel+0x102/0x111
|
||||
|
||||
Resolves:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=755154
|
||||
|
||||
Reported-by: vjain02-9geRo0GdX4mblYp+tMVdN4dd74u8MsAO@public.gmane.org
|
||||
Reported-and-tested-by: Oliver Paukstadt <pstadt-J4iCZ0GWXu6s5+MaFmuW5Q@public.gmane.org>
|
||||
Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
|
||||
Acked-by: Larry Finger <Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
|
||||
Signed-off-by: Stanislaw Gruszka <sgruszka-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
|
||||
---
|
||||
v1 -> v2: add bug report reference
|
||||
|
||||
drivers/net/wireless/rtlwifi/ps.c | 17 +++++++++--------
|
||||
1 files changed, 9 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/rtlwifi/ps.c b/drivers/net/wireless/rtlwifi/ps.c
|
||||
index db52628..55c8e50 100644
|
||||
--- a/drivers/net/wireless/rtlwifi/ps.c
|
||||
+++ b/drivers/net/wireless/rtlwifi/ps.c
|
||||
@@ -395,7 +395,7 @@ void rtl_lps_enter(struct ieee80211_hw *hw)
|
||||
if (mac->link_state != MAC80211_LINKED)
|
||||
return;
|
||||
|
||||
- spin_lock(&rtlpriv->locks.lps_lock);
|
||||
+ spin_lock_irq(&rtlpriv->locks.lps_lock);
|
||||
|
||||
/* Idle for a while if we connect to AP a while ago. */
|
||||
if (mac->cnt_after_linked >= 2) {
|
||||
@@ -407,7 +407,7 @@ void rtl_lps_enter(struct ieee80211_hw *hw)
|
||||
}
|
||||
}
|
||||
|
||||
- spin_unlock(&rtlpriv->locks.lps_lock);
|
||||
+ spin_unlock_irq(&rtlpriv->locks.lps_lock);
|
||||
}
|
||||
|
||||
/*Leave the leisure power save mode.*/
|
||||
@@ -416,8 +416,9 @@ void rtl_lps_leave(struct ieee80211_hw *hw)
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
|
||||
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
|
||||
+ unsigned long flags;
|
||||
|
||||
- spin_lock(&rtlpriv->locks.lps_lock);
|
||||
+ spin_lock_irqsave(&rtlpriv->locks.lps_lock, flags);
|
||||
|
||||
if (ppsc->fwctrl_lps) {
|
||||
if (ppsc->dot11_psmode != EACTIVE) {
|
||||
@@ -438,7 +439,7 @@ void rtl_lps_leave(struct ieee80211_hw *hw)
|
||||
rtl_lps_set_psmode(hw, EACTIVE);
|
||||
}
|
||||
}
|
||||
- spin_unlock(&rtlpriv->locks.lps_lock);
|
||||
+ spin_unlock_irqrestore(&rtlpriv->locks.lps_lock, flags);
|
||||
}
|
||||
|
||||
/* For sw LPS*/
|
||||
@@ -539,9 +540,9 @@ void rtl_swlps_rf_awake(struct ieee80211_hw *hw)
|
||||
RT_CLEAR_PS_LEVEL(ppsc, RT_PS_LEVEL_ASPM);
|
||||
}
|
||||
|
||||
- spin_lock(&rtlpriv->locks.lps_lock);
|
||||
+ spin_lock_irq(&rtlpriv->locks.lps_lock);
|
||||
rtl_ps_set_rf_state(hw, ERFON, RF_CHANGE_BY_PS);
|
||||
- spin_unlock(&rtlpriv->locks.lps_lock);
|
||||
+ spin_unlock_irq(&rtlpriv->locks.lps_lock);
|
||||
}
|
||||
|
||||
void rtl_swlps_rfon_wq_callback(void *data)
|
||||
@@ -574,9 +575,9 @@ void rtl_swlps_rf_sleep(struct ieee80211_hw *hw)
|
||||
if (rtlpriv->link_info.busytraffic)
|
||||
return;
|
||||
|
||||
- spin_lock(&rtlpriv->locks.lps_lock);
|
||||
+ spin_lock_irq(&rtlpriv->locks.lps_lock);
|
||||
rtl_ps_set_rf_state(hw, ERFSLEEP, RF_CHANGE_BY_PS);
|
||||
- spin_unlock(&rtlpriv->locks.lps_lock);
|
||||
+ spin_unlock_irq(&rtlpriv->locks.lps_lock);
|
||||
|
||||
if (ppsc->reg_rfps_level & RT_RF_OFF_LEVL_ASPM &&
|
||||
!RT_IN_PS_LEVEL(ppsc, RT_PS_LEVEL_ASPM)) {
|
||||
--
|
||||
1.7.1
|
||||
|
||||
--
|
||||
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
|
||||
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
|
||||
More majordomo info at http://vger.kernel.org/majordomo-info.html
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
X-Spam-Checker-Version: SpamAssassin 3.4.0-r929098 (2010-03-30) on oss.sgi.com
|
||||
X-Spam-Level:
|
||||
X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,J_CHICKENPOX_64
|
||||
autolearn=no version=3.4.0-r929098
|
||||
Received: from cuda.sgi.com (cuda1.sgi.com [192.48.157.11])
|
||||
by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id p9I1KBVD036341
|
||||
for <xfs@oss.sgi.com>; Mon, 17 Oct 2011 20:20:11 -0500
|
||||
X-ASG-Debug-ID: 1318901280-3911029d0000-NocioJ
|
||||
X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi
|
||||
Received: from hades.usersys.redhat.com (localhost [127.0.0.1])
|
||||
by cuda.sgi.com (Spam Firewall) with ESMTP id B9D1DF75F0A
|
||||
for <xfs@oss.sgi.com>; Mon, 17 Oct 2011 18:28:01 -0700 (PDT)
|
||||
Received: from hades.usersys.redhat.com ([187.60.101.4]) by cuda.sgi.com with ESMTP id 81CuyNdYBqrtvtnD for <xfs@oss.sgi.com>; Mon, 17 Oct 2011 18:28:01 -0700 (PDT)
|
||||
Received: by hades.usersys.redhat.com (Postfix, from userid 500)
|
||||
id 5B763E089B; Tue, 18 Oct 2011 02:18:59 -0200 (BRST)
|
||||
From: Carlos Maiolino <cmaiolino@redhat.com>
|
||||
To: xfs@oss.sgi.com
|
||||
Cc: Carlos Maiolino <cmaiolino@redhat.com>
|
||||
X-ASG-Orig-Subj: [PATCH] Fix possible memory corruption in xfs_readlink
|
||||
Subject: [PATCH] Fix possible memory corruption in xfs_readlink
|
||||
Date: Tue, 18 Oct 2011 02:18:58 -0200
|
||||
Message-Id: <1318911538-9174-1-git-send-email-cmaiolino@redhat.com>
|
||||
X-Mailer: git-send-email 1.7.6.2
|
||||
X-Barracuda-Connect: UNKNOWN[187.60.101.4]
|
||||
X-Barracuda-Start-Time: 1318901282
|
||||
X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210
|
||||
X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com
|
||||
X-Barracuda-Spam-Score: -1.42
|
||||
X-Barracuda-Spam-Status: No, SCORE=-1.42 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests=BSF_SC5_MJ1963, RDNS_NONE
|
||||
X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.77645
|
||||
Rule breakdown below
|
||||
pts rule name description
|
||||
---- ---------------------- --------------------------------------------------
|
||||
0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS
|
||||
0.50 BSF_SC5_MJ1963 Custom Rule MJ1963
|
||||
X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com
|
||||
X-Virus-Status: Clean
|
||||
|
||||
Fixes a possible memory corruption when the link is larger than
|
||||
MAXPATHLEN and XFS_DEBUG is not enabled. This also remove the
|
||||
S_ISLNK assert, since the inode mode is checked previously in
|
||||
xfs_readlink_by_handle() and via VFS.
|
||||
|
||||
Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
|
||||
---
|
||||
fs/xfs/xfs_vnodeops.c | 11 ++++++++---
|
||||
1 files changed, 8 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
|
||||
index 51fc429..c3288be 100644
|
||||
--- a/fs/xfs/xfs_vnodeops.c
|
||||
+++ b/fs/xfs/xfs_vnodeops.c
|
||||
@@ -123,13 +123,18 @@ xfs_readlink(
|
||||
|
||||
xfs_ilock(ip, XFS_ILOCK_SHARED);
|
||||
|
||||
- ASSERT(S_ISLNK(ip->i_d.di_mode));
|
||||
- ASSERT(ip->i_d.di_size <= MAXPATHLEN);
|
||||
-
|
||||
pathlen = ip->i_d.di_size;
|
||||
if (!pathlen)
|
||||
goto out;
|
||||
|
||||
+ if (pathlen > MAXPATHLEN) {
|
||||
+ xfs_alert(mp, "%s: inode (%llu) symlink length (%d) too long",
|
||||
+ __func__, (unsigned long long)ip->i_ino, pathlen);
|
||||
+ ASSERT(0);
|
||||
+ return XFS_ERROR(EFSCORRUPTED);
|
||||
+ }
|
||||
+
|
||||
+
|
||||
if (ip->i_df.if_flags & XFS_IFINLINE) {
|
||||
memcpy(link, ip->i_df.if_u1.if_data, pathlen);
|
||||
link[pathlen] = '\0';
|
||||
--
|
||||
1.7.6.2
|
||||
|
Loading…
Reference in New Issue