From: Luis Henriques <luis.henriques@canonical.com>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
kernel-team@lists.ubuntu.com
Cc: Daniel Fu <danifu@nvidia.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Mark Brown <broonie@kernel.org>,
Luis Henriques <luis.henriques@canonical.com>
Subject: [PATCH 3.11 38/46] cpuidle: Check the result of cpuidle_get_driver() against NULL
Date: Wed, 16 Apr 2014 11:31:54 +0100 [thread overview]
Message-ID: <1397644322-13905-39-git-send-email-luis.henriques@canonical.com> (raw)
In-Reply-To: <1397644322-13905-1-git-send-email-luis.henriques@canonical.com>
3.11.10.8 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Fu <danifu@nvidia.com>
commit 3b9c10e98021e1f92e6f8c7ce1778b86ba68db10 upstream.
If the current CPU has no cpuidle driver, drv will be NULL in
cpuidle_driver_ref(). Check if that is the case before trying
to bump up the driver's refcount to prevent the kernel from
crashing.
[rjw: Subject and changelog]
Signed-off-by: Daniel Fu <danifu@nvidia.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/cpuidle/driver.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c
index 3ac499d..6e11701 100644
--- a/drivers/cpuidle/driver.c
+++ b/drivers/cpuidle/driver.c
@@ -331,7 +331,8 @@ struct cpuidle_driver *cpuidle_driver_ref(void)
spin_lock(&cpuidle_driver_lock);
drv = cpuidle_get_driver();
- drv->refcnt++;
+ if (drv)
+ drv->refcnt++;
spin_unlock(&cpuidle_driver_lock);
return drv;
--
1.9.1
next prev parent reply other threads:[~2014-04-16 10:33 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-16 10:31 [3.11.y.z extended stable] Linux 3.11.10.8 stable review Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 01/46] Input: cypress_ps2 - don't report as a button pads Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 02/46] netfilter: nf_conntrack_dccp: fix skb_header_pointer API usages Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 03/46] cpufreq: Fix timer/workqueue corruption due to double queueing Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 04/46] futex: Allow architectures to skip futex_atomic_cmpxchg_inatomic() test Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 05/46] m68k: Skip " Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 06/46] powernow-k6: disable cache when changing frequency Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 07/46] powernow-k6: correctly initialize default parameters Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 08/46] powernow-k6: reorder frequencies Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 09/46] selinux: correctly label /proc inodes in use before the policy is loaded Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 10/46] net: fix for a race condition in the inet frag code Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 11/46] net: sctp: fix skb leakage in COOKIE ECHO path of chunk->auth_chunk Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 12/46] bridge: multicast: add sanity check for query source addresses Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 13/46] inet: frag: make sure forced eviction removes all frags Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 14/46] net: unix: non blocking recvmsg() should not return -EINTR Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 15/46] ipv6: Fix exthdrs offload registration Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 16/46] ipv6: don't set DST_NOCOUNT for remotely added routes Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 17/46] vlan: Set correct source MAC address with TX VLAN offload enabled Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 18/46] tcp: tcp_release_cb() should release socket ownership Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 19/46] net: socket: error on a negative msg_namelen Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 20/46] ipv6: Avoid unnecessary temporary addresses being generated Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 21/46] ipv6: ip6_append_data_mtu do not handle the mtu of the second fragment properly Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 22/46] vxlan: fix potential NULL dereference in arp_reduce() Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 23/46] rtnetlink: fix fdb notification flags Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 24/46] ipmr: fix mfc " Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 25/46] ip6mr: " Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 26/46] netpoll: fix the skb check in pkt_is_ns Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 27/46] tg3: Do not include vlan acceleration features in vlan_features Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 28/46] usbnet: include wait queue head in device structure Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 29/46] vlan: Set hard_header_len according to available acceleration Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 30/46] vhost: fix total length when packets are too short Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 31/46] vhost: validate vhost_get_vq_desc return value Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 32/46] xen-netback: remove pointless clause from if statement Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 33/46] ipv6: some ipv6 statistic counters failed to disable bh Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 34/46] netlink: don't compare the nul-termination in nla_strcmp Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 35/46] isdnloop: Validate NUL-terminated strings from user Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 36/46] isdnloop: several buffer overflows Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 37/46] rds: prevent dereference of a NULL device in rds_iw_laddr_check Luis Henriques
2014-04-16 10:31 ` Luis Henriques [this message]
2014-04-16 10:31 ` [PATCH 3.11 39/46] sparc: PCI: Fix incorrect address calculation of PCI Bridge windows on Simba-bridges Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 40/46] Revert "sparc64: Fix __copy_{to,from}_user_inatomic defines." Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 41/46] sparc32: fix build failure for arch_jump_label_transform Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 42/46] sparc64: don't treat 64-bit syscall return codes as 32-bit Luis Henriques
2014-04-16 10:31 ` [PATCH 3.11 43/46] sparc64: Make sure %pil interrupts are enabled during hypervisor yield Luis Henriques
2014-04-16 10:32 ` [PATCH 3.11 44/46] netfilter: nf_conntrack: reserve two bytes for nf_ct_ext->len Luis Henriques
2014-04-16 10:32 ` [PATCH 3.11 45/46] netfilter: Can't fail and free after table replacement Luis Henriques
2014-04-16 10:32 ` [PATCH 3.11 46/46] crypto: ghash-clmulni-intel - use C implementation for setkey() 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=1397644322-13905-39-git-send-email-luis.henriques@canonical.com \
--to=luis.henriques@canonical.com \
--cc=broonie@kernel.org \
--cc=danifu@nvidia.com \
--cc=kernel-team@lists.ubuntu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--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®