From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Josh Boyer <jwboyer@fedoraproject.org>,
Dominik Brodowski <linux@dominikbrodowski.net>,
Thomas Renninger <trenn@suse.de>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: [PATCH 3.4 29/43] cpupower: Fix segfault due to incorrect getopt_long arugments
Date: Mon, 6 Jan 2014 14:39:46 -0800 [thread overview]
Message-ID: <20140106223943.084918748@linuxfoundation.org> (raw)
In-Reply-To: <20140106223942.259651490@linuxfoundation.org>
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josh Boyer <jwboyer@redhat.com>
commit f447ef4a56dee4b68a91460bcdfe06b5011085f2 upstream.
If a user calls 'cpupower set --perf-bias 15', the process will end with
a SIGSEGV in libc because cpupower-set passes a NULL optarg to the atoi
call. This is because the getopt_long structure currently has all of
the options as having an optional_argument when they really have a
required argument. We change the structure to use required_argument to
match the short options and it resolves the issue.
This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1000439
Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
tools/power/cpupower/utils/cpupower-set.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/tools/power/cpupower/utils/cpupower-set.c
+++ b/tools/power/cpupower/utils/cpupower-set.c
@@ -18,9 +18,9 @@
#include "helpers/bitmask.h"
static struct option set_opts[] = {
- { .name = "perf-bias", .has_arg = optional_argument, .flag = NULL, .val = 'b'},
- { .name = "sched-mc", .has_arg = optional_argument, .flag = NULL, .val = 'm'},
- { .name = "sched-smt", .has_arg = optional_argument, .flag = NULL, .val = 's'},
+ { .name = "perf-bias", .has_arg = required_argument, .flag = NULL, .val = 'b'},
+ { .name = "sched-mc", .has_arg = required_argument, .flag = NULL, .val = 'm'},
+ { .name = "sched-smt", .has_arg = required_argument, .flag = NULL, .val = 's'},
{ },
};
next prev parent reply other threads:[~2014-01-06 22:39 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-06 22:39 [PATCH 3.4 00/43] 3.4.76-stable review Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 01/43] USB: serial: fix race in generic write Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 02/43] ceph: cleanup aborted requests when re-sending requests Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 03/43] ceph: wake up safe waiters when unregistering request Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 04/43] powerpc: kvm: fix rare but potential deadlock scene Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 05/43] TTY: pmac_zilog, check existence of ports in pmz_console_init() Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 06/43] ASoC: wm8904: fix DSP mode B configuration Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 07/43] ALSA: Add SNDRV_PCM_STATE_PAUSED case in wait_for_avail function Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 09/43] selinux: fix broken peer recv check Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 10/43] selinux: selinux_setprocattr()->ptrace_parent() needs rcu_read_lock() Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 11/43] ftrace: Initialize the ftrace profiler for each possible cpu Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 12/43] intel_idle: initial IVB support Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 13/43] intel_idle: enable IVB Xeon support Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 14/43] ext4: fix use-after-free in ext4_mb_new_blocks Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 16/43] sched/rt: Fix rqs cpupri leak while enqueue/dequeue child RT entities Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 18/43] net_dma: mark broken Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 19/43] drm/radeon: fix asic gfx values for scrapper asics Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 20/43] drm/radeon: 0x9649 is SUMO2 not SUMO Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 21/43] ceph: Avoid data inconsistency due to d-cache aliasing in readpage() Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 22/43] tg3: Expand 4g_overflow_test workaround to skb fragments of any size Greg Kroah-Hartman
2014-01-06 22:58 ` Eric Dumazet
2014-01-06 23:05 ` Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 23/43] dm9601: fix reception of full size ethernet frames on dm9620/dm9621a Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 24/43] dm9601: work around tx fifo sync issue on dm962x Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 25/43] ath9k: Fix interrupt handling for the AR9002 family Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 26/43] ath9k_htc: properly set MAC address and BSSID mask Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 27/43] powerpc: Fix bad stack check in exception entry Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 28/43] powerpc: Align p_end Greg Kroah-Hartman
2014-01-06 22:39 ` Greg Kroah-Hartman [this message]
2014-01-06 22:39 ` [PATCH 3.4 30/43] libata: add ATA_HORKAGE_BROKEN_FPDMA_AA quirk for Seagate Momentus SpinPoint M8 Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 31/43] radiotap: fix bitmap-end-finding buffer overrun Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 32/43] rtlwifi: pci: Fix oops on driver unload Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 33/43] mm/hugetlb: check for pte NULL pointer in __page_check_address() Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 34/43] Input: allocate absinfo data when setting ABS capability Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 35/43] GFS2: dont hold s_umount over blkdev_put Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 36/43] GFS2: Fix incorrect invalidation for DIO/buffered I/O Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 37/43] jbd2: dont BUG but return ENOSPC if a handle runs out of space Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 38/43] gpio: msm: Fix irq mask/unmask by writing bits instead of numbers Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 39/43] sched: Avoid throttle_cfs_rq() racing with period_timer stopping Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 40/43] sh: always link in helper functions extracted from libgcc Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 41/43] selinux: look for IPsec labels on both inbound and outbound packets Greg Kroah-Hartman
2014-01-06 22:39 ` [PATCH 3.4 42/43] selinux: process labeled IPsec TCP SYN-ACK packets properly in selinux_ip_postroute() Greg Kroah-Hartman
2014-01-06 22:40 ` [PATCH 3.4 43/43] hwmon: (w83l768ng) Fix fan speed control range Greg Kroah-Hartman
2014-01-07 5:01 ` [PATCH 3.4 00/43] 3.4.76-stable review Guenter Roeck
2014-01-07 15:22 ` Greg Kroah-Hartman
2014-01-07 19:09 ` Shuah Khan
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=20140106223943.084918748@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=jwboyer@fedoraproject.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@dominikbrodowski.net \
--cc=stable@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=trenn@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).