mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Luis Henriques <luis.henriques@canonical.com>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	kernel-team@lists.ubuntu.com
Cc: Libin <huawei.libin@huawei.com>, <jiang.liu@huawei.com>,
	<guohanjun@huawei.com>, Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	Luis Henriques <luis.henriques@canonical.com>
Subject: [PATCH 48/70] sched/debug: Fix sd->*_idx limit range avoiding overflow
Date: Tue,  4 Jun 2013 15:07:04 +0100	[thread overview]
Message-ID: <1370354846-14213-49-git-send-email-luis.henriques@canonical.com> (raw)
In-Reply-To: <1370354846-14213-1-git-send-email-luis.henriques@canonical.com>

3.5.7.14 -stable review patch.  If anyone has any objections, please let me know.

------------------

From: libin <huawei.libin@huawei.com>

commit fd9b86d37a600488dbd80fe60cca46b822bff1cd upstream.

Commit 201c373e8e ("sched/debug: Limit sd->*_idx range on
sysctl") was an incomplete bug fix.

This patch fixes sd->*_idx limit range to [0 ~ CPU_LOAD_IDX_MAX-1]
avoiding array overflow caused by setting sd->*_idx to CPU_LOAD_IDX_MAX
on sysctl.

Signed-off-by: Libin <huawei.libin@huawei.com>
Cc: <jiang.liu@huawei.com>
Cc: <guohanjun@huawei.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/51626610.2040607@huawei.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
 kernel/sched/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index e22a1f0..89e8c2c 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5435,7 +5435,7 @@ static void sd_free_ctl_entry(struct ctl_table **tablep)
 }
 
 static int min_load_idx = 0;
-static int max_load_idx = CPU_LOAD_IDX_MAX;
+static int max_load_idx = CPU_LOAD_IDX_MAX-1;
 
 static void
 set_table_entry(struct ctl_table *entry,
-- 
1.8.1.2


  parent reply	other threads:[~2013-06-04 14:14 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-04 14:06 [ 3.5.y.z extended stable ] Linux 3.5.7.14 stable review Luis Henriques
2013-06-04 14:06 ` [PATCH 01/70] hwmon: fix error return code in abituguru_probe() Luis Henriques
2013-06-04 14:06 ` [PATCH 02/70] i2c: designware: fix RX FIFO overrun Luis Henriques
2013-06-04 14:06 ` [PATCH 03/70] i2c: designware: always clear interrupts before enabling them Luis Henriques
2013-06-04 14:06 ` [PATCH 04/70] btrfs: don't stop searching after encountering the wrong item Luis Henriques
2013-06-04 14:06 ` [PATCH 05/70] drm/radeon: Fix VRAM size calculation for VRAM >= 4GB Luis Henriques
2013-06-04 14:06 ` [PATCH 06/70] mantis: fix silly crash case Luis Henriques
2013-06-04 14:06 ` [PATCH 07/70] avr32: fix relocation check for signed 18-bit offset Luis Henriques
2013-06-04 14:06 ` [PATCH 08/70] virtio_console: fix uapi header Luis Henriques
2013-06-04 14:06 ` [PATCH 09/70] Input: egalax_ts - ABS_MT_POSITION_Y not reported well Luis Henriques
2013-06-04 14:06 ` [PATCH 10/70] staging: vt6656: use free_netdev instead of kfree Luis Henriques
2013-06-04 14:06 ` [PATCH 11/70] USB: xHCI: override bogus bulk wMaxPacketSize values Luis Henriques
2013-06-04 14:06 ` [PATCH 12/70] USB: UHCI: fix for suspend of virtual HP controller Luis Henriques
2013-06-04 14:06 ` [PATCH 13/70] USB: reset resume quirk needed by a hub Luis Henriques
2013-06-04 14:06 ` [PATCH 14/70] usb: option: Add Telewell TW-LTE 4G Luis Henriques
2013-06-04 14:06 ` [PATCH 15/70] USB: Blacklisted Cinterion's PLxx WWAN Interface Luis Henriques
2013-06-04 14:06 ` [PATCH 16/70] USB: option: add device IDs for Dell 5804 (Novatel E371) WWAN card Luis Henriques
2013-06-04 14:06 ` [PATCH 17/70] USB: ftdi_sio: Add support for Newport CONEX motor drivers Luis Henriques
2013-06-04 14:06 ` [PATCH 18/70] USB: cxacru: potential underflow in cxacru_cm_get_array() Luis Henriques
2013-06-04 14:06 ` [PATCH 19/70] TTY: Fix tty miss restart after we turn off flow-control Luis Henriques
2013-06-04 14:06 ` [PATCH 20/70] cifs: only set ops for inodes in I_NEW state Luis Henriques
2013-06-04 14:06 ` [PATCH 21/70] Kirkwood: Enable PCIe port 1 on QNAP TS-11x/TS-21x Luis Henriques
2013-06-04 14:06 ` [PATCH 22/70] mac80211: fix AP-mode frame matching Luis Henriques
2013-06-04 14:06 ` [PATCH 23/70] ARM: plat-orion: Fix num_resources and id for ge10 and ge11 Luis Henriques
2013-06-04 14:06 ` [PATCH 24/70] sunrpc: clarify comments on rpc_make_runnable Luis Henriques
2013-06-04 14:06 ` [PATCH 25/70] SUNRPC: Prevent an rpc_task wakeup race Luis Henriques
2013-06-04 14:06 ` [PATCH 26/70] perf: net_dropmonitor: Fix trace parameter order Luis Henriques
2013-06-04 14:06 ` [PATCH 27/70] perf: net_dropmonitor: Fix symbol-relative addresses Luis Henriques
2013-06-04 14:06 ` [PATCH 28/70] fat: fix possible overflow for fat_clusters Luis Henriques
2013-06-04 14:06 ` [PATCH 29/70] wait: fix false timeouts when using wait_event_timeout() Luis Henriques
2013-06-04 14:06 ` [PATCH 30/70] rapidio/tsi721: fix bug in MSI interrupt handling Luis Henriques
2013-06-04 14:06 ` [PATCH 31/70] mm compaction: fix of improper cache flush in migration code Luis Henriques
2013-06-04 14:06 ` [PATCH 32/70] mm/THP: use pmd_populate() to update the pmd with pgtable_t pointer Luis Henriques
2013-06-04 14:06 ` [PATCH 33/70] drivers/leds/leds-ot200.c: fix error caused by shifted mask Luis Henriques
2013-06-04 14:06 ` [PATCH 34/70] drivers/block/brd.c: fix brd_lookup_page() race Luis Henriques
2013-06-04 14:06 ` [PATCH 35/70] nilfs2: fix issue of nilfs_set_page_dirty() for page at EOF boundary Luis Henriques
2013-06-04 14:06 ` [PATCH 36/70] random: fix accounting race condition with lockless irq entropy_count update Luis Henriques
2013-06-04 14:06 ` [PATCH 37/70] ocfs2: goto out_unlock if ocfs2_get_clusters_nocache() failed in ocfs2_fiemap() Luis Henriques
2013-06-04 14:06 ` [PATCH 38/70] mm/pagewalk.c: walk_page_range should avoid VM_PFNMAP areas Luis Henriques
2013-06-04 14:06 ` [PATCH 39/70] staging:iio:light:tsl2x7x: fix the error handling in tsl2x7x_probe() Luis Henriques
2013-06-04 14:06 ` [PATCH 40/70] mwifiex: fix memory leak issue when driver unload Luis Henriques
2013-06-04 14:06 ` [PATCH 41/70] dm bufio: avoid a possible __vmalloc deadlock Luis Henriques
2013-06-04 14:06 ` [PATCH 42/70] tg3: Skip powering down function 0 on certain serdes devices Luis Henriques
2013-06-04 14:06 ` [PATCH 43/70] acpi/video_detect: blacklist samsung x360 Luis Henriques
2013-06-04 14:07 ` [PATCH 44/70] ACPI / video: Add "Asus UL30VT" to ACPI video detect blacklist Luis Henriques
2013-06-04 14:07 ` [PATCH 45/70] ACPI / video: Add "Asus UL30A" " Luis Henriques
2013-06-04 14:07 ` [PATCH 46/70] mm: mmu_notifier: re-fix freed page still mapped in secondary MMU Luis Henriques
2013-06-04 14:07 ` [PATCH 47/70] sched/debug: Limit sd->*_idx range on sysctl Luis Henriques
2013-06-04 14:07 ` Luis Henriques [this message]
2013-06-04 14:07 ` [PATCH 49/70] ipvs: ip_vs_sip_fill_param() BUG: bad check of return value Luis Henriques
2013-06-04 14:07 ` [PATCH 50/70] jfs: fix a couple races Luis Henriques
2013-06-04 14:07 ` [PATCH 51/70] cifs: fix potential buffer overrun when composing a new options string Luis Henriques
2013-06-04 14:07 ` [PATCH 52/70] ASoC: cs42l52: fix default value for MASTERA_VOL Luis Henriques
2013-06-04 14:07 ` [PATCH 53/70] drm/radeon: fix typo in cu_per_sh on verde Luis Henriques
2013-06-04 14:07 ` [PATCH 54/70] drm/radeon: fix card_posted check for newer asics Luis Henriques
2013-06-04 14:07 ` [PATCH 55/70] NFSv4: Fix a thinko in nfs4_try_open_cached Luis Henriques
2013-06-04 14:07 ` [PATCH 56/70] xfs: kill suid/sgid through the truncate path Luis Henriques
2013-06-04 14:07 ` [PATCH 57/70] iscsi-target: fix heap buffer overflow on error Luis Henriques
2013-06-04 14:07 ` [PATCH 58/70] reiserfs: fix deadlock with nfs racing on create/lookup Luis Henriques
2013-06-04 14:07 ` [PATCH 59/70] reiserfs: fix problems with chowning setuid file w/ xattrs Luis Henriques
2013-06-04 14:07 ` [PATCH 60/70] reiserfs: fix spurious multiple-fill in reiserfs_readdir_dentry Luis Henriques
2013-06-04 14:07 ` [PATCH 61/70] xen-netback: remove skb in xen_netbk_alloc_page Luis Henriques
2013-06-04 14:07 ` [PATCH 62/70] xen-netback: fix sparse warning Luis Henriques
2013-06-04 14:07 ` [PATCH 63/70] xen-netback: coalesce slots in TX path and fix regressions Luis Henriques
2013-06-04 14:07 ` [PATCH 64/70] xen-netback: don't disconnect frontend when seeing oversize packet Luis Henriques
2013-06-04 14:07 ` [PATCH 65/70] xen-netback: remove redundent parameter in netbk_count_requests Luis Henriques
2013-06-04 14:07 ` [PATCH 66/70] xen-netback: avoid allocating variable size array on stack Luis Henriques
2013-06-04 14:07 ` [PATCH 67/70] xen-netback: better names for thresholds Luis Henriques
2013-06-04 14:07 ` [PATCH 68/70] xen-netfront: remove unused variable `extra' Luis Henriques
2013-06-04 14:07 ` [PATCH 69/70] xen-netfront: frags -> slots in xennet_get_responses Luis Henriques
2013-06-04 14:07 ` [PATCH 70/70] xen-netfront: frags -> slots in log message Luis Henriques

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1370354846-14213-49-git-send-email-luis.henriques@canonical.com \
    --to=luis.henriques@canonical.com \
    --cc=guohanjun@huawei.com \
    --cc=huawei.libin@huawei.com \
    --cc=jiang.liu@huawei.com \
    --cc=kernel-team@lists.ubuntu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®