3.14.20-stable review
Subsystems (2)
Greg Kroah-Hartman
maintainerPATCH 199/238 GFS2: fix d_splice_alias() misuses
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Al Viro <[email protected]>
commit cfb2f9d5c921e38b0f12bb26fed10b877664444d upstream.
Callers of d_splice_alias(dentry, inode) don't need iput(), neither on success nor on failure. Either the reference to inode is stored in a previously negative dentry, or it's dropped. In either case inode reference the caller used to hold is consumed.
__gfs2_lookup() does iput() in case when d_splice_alias() has failed. Double iput() if we ever hit that. And gfs2_create_inode() ends up not only with double iput(), but with link count dropped to zero - on an inode it has just found in directory.
--- fs/gfs2/inode.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
fs/gfs2/inode.c +3 -2
@@ -606,8 +606,10 @@ static int gfs2_create_inode(struct inodif (!IS_ERR (inode)) { d =d_splice_alias (inode, dentry); error =PTR_ERR (d); -if (IS_ERR (d)) +if (IS_ERR (d)) { + inode =ERR_CAST (d); goto fail_gunlock; + } error =0 ;if (file) {if (S_ISREG (inode->i_mode)) {
@@ -823,7 +825,6 @@ static struct dentry *__gfs2_lookup(stru d =d_splice_alias (inode, dentry);if (IS_ERR (d)) { -iput (inode);gfs2_glock_dq_uninit (&gh);return d; }
Greg Kroah-Hartman
maintainerPATCH 200/238 IB/qib: Correct reference counting in debugfs qp_stats
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mike Marciniszyn <[email protected]>
commit 85cbb7c728bf39c45a9789b88c9471c0d7a58b0e upstream.
This particular reference count is not needed with the rcu protection, and the current code leaks a reference count, causing a hang in qib_qp_destroy().
--- drivers/infiniband/hw/qib/qib_debugfs.c | 3 ++- drivers/infiniband/hw/qib/qib_qp.c | 8 -------- 2 files changed, 2 insertions(+), 9 deletions(-)
drivers/infiniband/hw/qib/qib_debugfs.c +2 -1
@@ -193,6 +193,7 @@ static void *_qp_stats_seq_start(structstruct qib_qp_iter *iter;loff_t n = *pos; +rcu_read_lock (); iter =qib_qp_iter_init (s->private);if (!iter)return NULL ;
@@ -224,7 +225,7 @@ static void *_qp_stats_seq_next(struct sstatic void _qp_stats_seq_stop (struct seq_file *s,void *iter_ptr) { -/* nothing for now */ +rcu_read_unlock (); }static int _qp_stats_seq_show (struct seq_file *s,void *iter_ptr)
drivers/infiniband/hw/qib/qib_qp.c +0 -8
@@ -1324,7 +1324,6 @@ int qib_qp_iter_next(struct qib_qp_iterstruct qib_qp *pqp = iter->qp;struct qib_qp *qp; -rcu_read_lock ();for (; n < dev->qp_table_size; n++) {if (pqp) qp =rcu_dereference (pqp->next);
@@ -1332,18 +1331,11 @@ int qib_qp_iter_next(struct qib_qp_iter qp =rcu_dereference (dev->qp_table[n]); pqp = qp;if (qp) { -if (iter->qp) -atomic_dec (&iter->qp->refcount); -atomic_inc (&qp->refcount); -rcu_read_unlock (); iter->qp = qp; iter->n = n;return 0 ; } } -rcu_read_unlock (); -if (iter->qp) -atomic_dec (&iter->qp->refcount);return ret; }
Greg Kroah-Hartman
maintainerPATCH 201/238 IB/mlx4: Avoid null pointer dereference in mlx4_ib_scan_netdevs()
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Moni Shoua <[email protected]>
commit e381835cf1b8e3b2857277dbc3b77d8c5350f70a upstream.
When Ethernet netdev is not present for a port (e.g. when the link layer type of the port is InfiniBand) it's possible to dereference a null pointer when we do netdevice scanning.
To fix that, we move a section of code that needs to run only when netdev is present to a proper if () statement.
--- drivers/infiniband/hw/mlx4/main.c | 49 ++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 23 deletions(-)
drivers/infiniband/hw/mlx4/main.c +26 -23
@@ -1723,31 +1723,34 @@ static void mlx4_ib_scan_netdevs(struct port_state = (netif_running (curr_netdev) &&netif_carrier_ok (curr_netdev)) ?IB_PORT_ACTIVE :IB_PORT_DOWN ;mlx4_ib_set_default_gid (ibdev, curr_netdev, port); - }else { -reset_gid_table (ibdev, port); - } -/* if using bonding/team and a slave port is down, we don't the bond IP -* based gids in the table since flows that select port by gid may get -* the down port. -*/ -if (curr_master && (port_state ==IB_PORT_DOWN )) { -reset_gid_table (ibdev, port); -mlx4_ib_set_default_gid (ibdev, curr_netdev, port); - } -/* if bonding is used it is possible that we add it to masters -* only after IP address is assigned to the net bonding -* interface. -*/ -if (curr_master && (old_master != curr_master)) { -reset_gid_table (ibdev, port); -mlx4_ib_set_default_gid (ibdev, curr_netdev, port); -mlx4_ib_get_dev_addr (curr_master, ibdev, port); - } +/* if using bonding/team and a slave port is down, we +* don't the bond IP based gids in the table since +* flows that select port by gid may get the down port. +*/ +if (curr_master && (port_state ==IB_PORT_DOWN )) { +reset_gid_table (ibdev, port); +mlx4_ib_set_default_gid (ibdev, + curr_netdev, port); + } +/* if bonding is used it is possible that we add it to +* masters only after IP address is assigned to the +* net bonding interface. +*/ +if (curr_master && (old_master != curr_master)) { +reset_gid_table (ibdev, port); +mlx4_ib_set_default_gid (ibdev, + curr_netdev, port); +mlx4_ib_get_dev_addr (curr_master, ibdev, port); + } -if (!curr_master && (old_master != curr_master)) { +if (!curr_master && (old_master != curr_master)) { +reset_gid_table (ibdev, port); +mlx4_ib_set_default_gid (ibdev, + curr_netdev, port); +mlx4_ib_get_dev_addr (curr_netdev, ibdev, port); + } + }else {reset_gid_table (ibdev, port); -mlx4_ib_set_default_gid (ibdev, curr_netdev, port); -mlx4_ib_get_dev_addr (curr_netdev, ibdev, port); } }
Greg Kroah-Hartman
maintainerPATCH 202/238 IB/mlx4: Dont duplicate the default RoCE GID
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Moni Shoua <[email protected]>
commit f5c4834d9328c4ed9fe5dcbec6128d6da16db69a upstream.
When reading the IPv6 addresses from the net-device, make sure to avoid adding a duplicate entry to the GID table because of equality between the default GID we generate and the default IPv6 link-local address of the device.
--- drivers/infiniband/hw/mlx4/main.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/infiniband/hw/mlx4/main.c +4 -0
@@ -1622,6 +1622,7 @@ static void mlx4_ib_get_dev_addr(structstruct inet6_dev *in6_dev;union ib_gid *pgid;struct inet6_ifaddr *ifp; +union ib_gid default_gid;#endif union ib_gid gid;
@@ -1642,12 +1643,15 @@ static void mlx4_ib_get_dev_addr(structin_dev_put (in_dev); }#if IS_ENABLED (CONFIG_IPV6 ) +mlx4_make_default_gid (dev, &default_gid);/* IPv6 gids */ in6_dev =in6_dev_get (dev);if (in6_dev) {read_lock_bh (&in6_dev->lock);list_for_each_entry (ifp, &in6_dev->addr_list, if_list) { pgid = (union ib_gid *)&ifp->addr; +if (!memcmp (pgid, &default_gid,sizeof (*pgid))) +continue ;update_gid_table (ibdev, port, pgid,0 ,0 ); }read_unlock_bh (&in6_dev->lock);
Greg Kroah-Hartman
maintainerPATCH 203/238 IB/core: When marshaling uverbs path, clear unused fields
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Matan Barak <[email protected]>
commit a59c5850f09b4c2d6ad2fc47e5e1be8d654529d6 upstream.
When marsheling a user path to the kernel struct ib_sa_path, need to zero smac, dmac and set the vlan id to the "no vlan" value.
--- drivers/infiniband/core/uverbs_marshall.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/infiniband/core/uverbs_marshall.c +4 -0
@@ -140,5 +140,9 @@ void ib_copy_path_rec_from_user(struct i dst->packet_life_time = src->packet_life_time; dst->preference = src->preference; dst->packet_life_time_selector = src->packet_life_time_selector; + +memset (dst->smac,0 ,sizeof (dst->smac)); +memset (dst->dmac,0 ,sizeof (dst->dmac)); + dst->vlan_id =0xffff ; }EXPORT_SYMBOL (ib_copy_path_rec_from_user);
Greg Kroah-Hartman
maintainerPATCH 204/238 perf: Fix a race condition in perf_remove_from_context()
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cong Wang <[email protected]>
commit 3577af70a2ce4853d58e57d832e687d739281479 upstream.
We saw a kernel soft lockup in perf_remove_from_context(), it looks like the perf process, when exiting, could not go out of the retry loop. Meanwhile, the target process was forking a child. So either the target process should execute the smp function call to deactive the event (if it was running) or it should do a context switch which deactives the event.
It seems we optimize out a context switch in perf_event_context_sched_out(), and what's more important, we still test an obsolete task pointer when retrying, so no one actually would deactive that event in this situation. Fix it directly by reloading the task pointer in perf_remove_from_context().
This should cure the above soft lockup.
--- kernel/events/core.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
kernel/events/core.c +10 -0
@@ -1516,6 +1516,11 @@ retry:*/ if (ctx->is_active) {raw_spin_unlock_irq (&ctx->lock); +/* +* Reload the task pointer, it might have been changed by +* a concurrent perf_event_context_sched_out(). +*/ + task = ctx->task; goto retry; }
@@ -1957,6 +1962,11 @@ retry:*/ if (ctx->is_active) {raw_spin_unlock_irq (&ctx->lock); +/* +* Reload the task pointer, it might have been changed by +* a concurrent perf_event_context_sched_out(). +*/ + task = ctx->task; goto retry; }
Greg Kroah-Hartman
maintainerPATCH 208/238 Fix nasty 32-bit overflow bug in buffer i/o code.
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Anton Altaparmakov <[email protected]>
commit f2d5a94436cc7cc0221b9a81bba2276a25187dd3 upstream.
On 32-bit architectures, the legacy buffer_head functions are not always handling the sector number with the proper 64-bit types, and will thus fail on 4TB+ disks.
Any code that uses __getblk() (and thus bread(), breadahead(), sb_bread(), sb_breadahead(), sb_getblk()), and calls it using a 64-bit block on a 32-bit arch (where "long" is 32-bit) causes an inifinite loop in __getblk_slow() with an infinite stream of errors logged to dmesg like this:
__find_get_block_slow() failed. block=6740375944, b_blocknr=2445408648 b_state=0x00000020, b_size=512
device sda1 blocksize: 512
Note how in hex block is 0x191C1F988 and b_blocknr is 0x91C1F988 i.e. the top 32-bits are missing (in this case the 0x1 at the top).
This is because grow_dev_page() is broken and has a 32-bit overflow due to shifting the page index value (a pgoff_t - which is just 32 bits on 32-bit architectures) left-shifted as the block number. But the top bits to get lost as the pgoff_t is not type cast to sector_t / 64-bit before the shift.
This patch fixes this issue by type casting "index" to sector_t before doing the left shift.
Note this is not a theoretical bug but has been seen in the field on a 4TiB hard drive with logical sector size 512 bytes.
This patch has been verified to fix the infinite loop problem on 3.17-rc5 kernel using a 4TB disk image mounted using "-o loop". Without this patch doing a "find /nt" where /nt is an NTFS volume causes the inifinite loop 100% reproducibly whilst with the patch it works fine as expected.
--- fs/buffer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
fs/buffer.c +4 -2
@@ -1029,7 +1029,8 @@ grow_dev_page(struct block_device *bdev, bh =page_buffers (page);if (bh->b_size == size) { end_block =init_page_buffers (page, bdev, - index << sizebits, size); + (sector_t )index << sizebits, + size); goto done; }if (!try_to_free_buffers (page))
@@ -1050,7 +1051,8 @@ grow_dev_page(struct block_device *bdev,*/ spin_lock (&inode->i_mapping->private_lock);link_dev_buffers (page, bh); - end_block =init_page_buffers (page, bdev, index << sizebits, size); + end_block =init_page_buffers (page, bdev, (sector_t )index << sizebits, + size);spin_unlock (&inode->i_mapping->private_lock); done: ret = (block < end_block) ?1 : -ENXIO ;
Greg Kroah-Hartman
maintainerPATCH 209/238 nl80211: clear skb cb before passing to netlink
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johannes Berg <[email protected]>
commit bd8c78e78d5011d8111bc2533ee73b13a3bd6c42 upstream.
In testmode and vendor command reply/event SKBs we use the skb cb data to store nl80211 parameters between allocation and sending. This causes the code for CONFIG_NETLINK_MMAP to get confused, because it takes ownership of the skb cb data when the SKB is handed off to netlink, and it doesn't explicitly clear it.
Clear the skb cb explicitly when we're done and before it gets passed to netlink to avoid this issue.
--- net/wireless/nl80211.c | 6 ++++++ 1 file changed, 6 insertions(+)
net/wireless/nl80211.c +6 -0
@@ -6796,6 +6796,9 @@ void __cfg80211_send_event_skb(struct skstruct nlattr *data = ((void **)skb->cb)[2 ];enum nl80211_multicast_groups mcgrp =NL80211_MCGRP_TESTMODE ; +/* clear CB data for netlink core to own from now on */ +memset (skb->cb,0 ,sizeof (skb->cb)); +nla_nest_end (skb, data);genlmsg_end (skb, hdr);
@@ -9075,6 +9078,9 @@ int cfg80211_vendor_cmd_reply(struct sk_void *hdr = ((void **)skb->cb)[1 ];struct nlattr *data = ((void **)skb->cb)[2 ]; +/* clear CB data for netlink core to own from now on */ +memset (skb->cb,0 ,sizeof (skb->cb)); +if (WARN_ON (!rdev->cur_cmd_info)) {kfree_skb (skb);return -EINVAL ;
Greg Kroah-Hartman
maintainerPATCH 210/238 cpufreq: release policy->rwsem on error
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Prarit Bhargava <[email protected]>
commit 7106e02baed4a72fb23de56b02ad4d31daa74d95 upstream.
While debugging a cpufreq-related hardware failure on a system I saw the following lockdep warning:
=========================
[ BUG: held lock freed! ] 3.17.0-rc4+ #1 Tainted: G E
-------------------------
insmod/2247 is freeing memory ffff88006e1b1400-ffff88006e1b17ff, with a lock still held there!
(&policy->rwsem){+.+...}, at: [<ffffffff8156d37d>] __cpufreq_add_dev.isra.21+0x47d/0xb80
3 locks held by insmod/2247:
#0: (subsys mutex#5){+.+.+.}, at: [<ffffffff81485579>] subsys_interface_register+0x69/0x120
#1: (cpufreq_rwsem){.+.+.+}, at: [<ffffffff8156cf73>] __cpufreq_add_dev.isra.21+0x73/0xb80
#2: (&policy->rwsem){+.+...}, at: [<ffffffff8156d37d>] __cpufreq_add_dev.isra.21+0x47d/0xb80stack backtrace: CPU: 0 PID: 2247 Comm: insmod Tainted: G E 3.17.0-rc4+ #1 Hardware name: HP ProLiant MicroServer Gen8, BIOS J06 08/24/2013 0000000000000000 000000008f3063c4 ffff88006f87bb30 ffffffff8171b358 ffff88006bcf3750 ffff88006f87bb68 ffffffff810e09e1 ffff88006e1b1400 ffffea0001b86c00 ffffffff8156d327 ffff880073003500 0000000000000246 Call Trace: [<ffffffff8171b358>] dump_stack+0x4d/0x66 [<ffffffff810e09e1>] debug_check_no_locks_freed+0x171/0x180 [<ffffffff8156d327>] ? __cpufreq_add_dev.isra.21+0x427/0xb80 [<ffffffff8121412b>] kfree+0xab/0x2b0 [<ffffffff8156d327>] __cpufreq_add_dev.isra.21+0x427/0xb80 [<ffffffff81724cf7>] ? _raw_spin_unlock+0x27/0x40 [<ffffffffa003517f>] ? pcc_cpufreq_do_osc+0x17f/0x17f [pcc_cpufreq] [<ffffffff8156da8e>] cpufreq_add_dev+0xe/0x10 [<ffffffff814855d1>] subsys_interface_register+0xc1/0x120 [<ffffffff8156bcf2>] cpufreq_register_driver+0x112/0x340 [<ffffffff8121415a>] ? kfree+0xda/0x2b0 [<ffffffffa003517f>] ? pcc_cpufreq_do_osc+0x17f/0x17f [pcc_cpufreq] [<ffffffffa003562e>] pcc_cpufreq_init+0x4af/0xe81 [pcc_cpufreq] [<ffffffffa003517f>] ? pcc_cpufreq_do_osc+0x17f/0x17f [pcc_cpufreq] [<ffffffff81002144>] do_one_initcall+0xd4/0x210 [<ffffffff811f7472>] ? __vunmap+0xd2/0x120 [<ffffffff81127155>] load_module+0x1315/0x1b70 [<ffffffff811222a0>] ? store_uevent+0x70/0x70 [<ffffffff811229d9>] ? copy_module_from_fd.isra.44+0x129/0x180 [<ffffffff81127b86>] SyS_finit_module+0xa6/0xd0 [<ffffffff81725b69>] system_call_fastpath+0x16/0x1b cpufreq: __cpufreq_add_dev: ->get() failed
insmod: ERROR: could not insert module pcc-cpufreq.ko: No such device
The warning occurs in the __cpufreq_add_dev() code which does
down_write(&policy->rwsem);
...
if (cpufreq_driver->get && !cpufreq_driver->setpolicy) {
policy->cur = cpufreq_driver->get(policy->cpu);
if (!policy->cur) {
pr_err("%s: ->get() failed\n", __func__);
goto err_get_freq;
}If cpufreq_driver->get(policy->cpu) returns an error we execute the code at err_get_freq, which does not up the policy->rwsem. This causes the lockdep warning.
Trivial patch to up the policy->rwsem in the error path.
After the patch has been applied, and an error occurs in the cpufreq_driver->get(policy->cpu) call we will now see
cpufreq: __cpufreq_add_dev: ->get() failed
cpufreq: __cpufreq_add_dev: ->get() failed
modprobe: ERROR: could not insert 'pcc_cpufreq': No such device
--- drivers/cpufreq/cpufreq.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/cpufreq/cpufreq.c +2 -0
@@ -1225,6 +1225,8 @@ err_get_freq:per_cpu (cpufreq_cpu_data, j) =NULL ;write_unlock_irqrestore (&cpufreq_driver_lock, flags); +up_write (&policy->rwsem); +if (cpufreq_driver->exit) cpufreq_driver->exit (policy); err_set_policy_cpu:
Greg Kroah-Hartman
maintainerPATCH 211/238 media: af9035: new IDs: add support for PCTV 78e and PCTV 79e
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Malcolm Priestley <[email protected]>
commit a04646c045cab08a9e62b9be8f01ecbb0632d24e upstream.
add the following IDsUSB_PID_PCTV_78E (0x025a) for PCTV 78eUSB_PID_PCTV_79E (0x0262) for PCTV 79e
For these it9135 devices.
--- drivers/media/dvb-core/dvb-usb-ids.h | 2 ++ drivers/media/usb/dvb-usb-v2/af9035.c | 4 ++++ 2 files changed, 6 insertions(+)
drivers/media/dvb-core/dvb-usb-ids.h +2 -0
@@ -279,6 +279,8 @@#define USB_PID_PCTV_400E 0x020f#define USB_PID_PCTV_450E 0x0222#define USB_PID_PCTV_452E 0x021f +#define USB_PID_PCTV_78E 0x025a +#define USB_PID_PCTV_79E 0x0262#define USB_PID_REALTEK_RTL2831U 0x2831#define USB_PID_REALTEK_RTL2832U 0x2832#define USB_PID_TECHNOTREND_CONNECT_S2_3600 0x3007
drivers/media/usb/dvb-usb-v2/af9035.c +4 -0
@@ -1541,6 +1541,10 @@ static const struct usb_device_id af9035 &af9035_props, "Leadtek WinFast DTV Dongle Dual", NULL) }, {DVB_USB_DEVICE (USB_VID_HAUPPAUGE ,0xf900 , &af9035_props, "Hauppauge WinTV-MiniStick 2", NULL) }, + { DVB_USB_DEVICE(USB_VID_PCTV, USB_PID_PCTV_78E, + &af9035_props, "PCTV 78e", RC_MAP_IT913X_V1) }, + { DVB_USB_DEVICE(USB_VID_PCTV, USB_PID_PCTV_79E, + &af9035_props, "PCTV 79e", RC_MAP_IT913X_V2) }, { } };MODULE_DEVICE_TABLE (usb, af9035_id_table);
Greg Kroah-Hartman
maintainerPATCH 212/238 media: cx18: fix kernel oops with tda8290 tuner
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hans Verkuil <[email protected]>
commit 6a03dc92cc2edfa2257502557b9f714893987383 upstream.
This was caused by an uninitialized setup.config field.
Based on a suggestion from Devin Heitmueller.
Thanks-to: Devin Heitmueller <[email protected]>
--- drivers/media/pci/cx18/cx18-driver.c | 1 + 1 file changed, 1 insertion(+)
drivers/media/pci/cx18/cx18-driver.c +1 -0
@@ -1091,6 +1091,7 @@ static int cx18_probe(struct pci_dev *pc setup.addr =ADDR_UNSET ; setup.type = cx->options.tuner; setup.mode_mask =T_ANALOG_TV ;/* matches TV tuners */ + setup.config =NULL ;if (cx->options.radio >0 ) setup.mode_mask |=T_RADIO ; setup.tuner_callback = (setup.type == TUNER_XC2028) ?
Greg Kroah-Hartman
maintainerPATCH 213/238 media: adv7604: fix inverted condition
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hans Verkuil <[email protected]>
commit 77639ff2b3404a913b8037d230a384798b854bae upstream.
The log_status function should show HDMI information, but the test checking for an HDMI input was inverted. Fix this.
--- drivers/media/i2c/adv7604.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/adv7604.c +1 -1
@@ -1984,7 +1984,7 @@ static int adv7604_log_status(struct v4lv4l2_info (sd,"HDCP keys read: %s%s\n" , (hdmi_read (sd,0x04 ) &0x20 ) ?"yes" :"no" , (hdmi_read (sd,0x04 ) &0x10 ) ?"ERROR" :"" ); -if (!is_hdmi (sd)) { +if (is_hdmi (sd)) {bool audio_pll_locked =hdmi_read (sd,0x04 ) &0x01 ;bool audio_sample_packet_detect =hdmi_read (sd,0x18 ) &0x01 ;bool audio_mute =io_read (sd,0x65 ) &0x40 ;
Greg Kroah-Hartman
maintainerPATCH 214/238 md/raid1: clean up request counts properly in close_sync()
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: NeilBrown <[email protected]>
commit 669cc7ba77864e7b1ac39c9f2b2afb8730f341f4 upstream.
If there are outstanding writes when close_sync is called, the change to ->start_next_window might cause them to decrement the wrong counter when they complete. Fix this by merging the two counters into the one that will be decremented.
Having an incorrect value in a counter can cause raise_barrier() to hangs, so this is suitable for -stable.
--- drivers/md/raid1.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/md/raid1.c +5 -0
@@ -1548,8 +1548,13 @@ static void close_sync(struct r1conf *comempool_destroy (conf->r1buf_pool); conf->r1buf_pool =NULL ; +spin_lock_irq (&conf->resync_lock); conf->next_resync =0 ; conf->start_next_window = MaxSector; + conf->current_window_requests += + conf->next_window_requests; + conf->next_window_requests =0 ; +spin_unlock_irq (&conf->resync_lock); }static int raid1_spare_active (struct mddev *mddev)
Greg Kroah-Hartman
maintainerPATCH 215/238 md/raid1: be more cautious where we read-balance during resync.
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: NeilBrown <[email protected]>
commit c6d119cf1b5a778e9ed60a006e2a434fcc4471a2 upstream.
commit 79ef3a8aa1cb1523cc231c9a90a278333c21f761 made it possible for reads to happen concurrently with resync. This means that we need to be more careful where read_balancing is allowed during resync - we can no longer be sure that any resync that has already started will definitely finish.
So keep read_balancing to before recovery_cp, which is conservative but safe.
This bug makes it possible to read from a device that doesn't have up-to-date data, so it can cause data corruption. So it is suitable for any kernel since 3.11.
--- drivers/md/raid1.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/md/raid1.c +1 -5
@@ -540,11 +540,7 @@ static int read_balance(struct r1conf *c has_nonrot_disk =0 ; choose_next_idle =0 ; -if (conf->mddev->recovery_cp < MaxSector && - (this_sector + sectors >= conf->next_resync)) - choose_first =1 ; -else - choose_first =0 ; + choose_first = (conf->mddev->recovery_cp < this_sector + sectors);for (disk =0 ; disk < conf->raid_disks *2 ; disk++) {sector_t dist;
Greg Kroah-Hartman
maintainerPATCH 216/238 md/raid1: make sure resync waits for conflicting writes to complete.
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: NeilBrown <[email protected]>
commit 2f73d3c55d09ce60647b96ad2a9b539c95a530ee upstream.
The resync/recovery process for raid1 was recently changed so that writes could happen in parallel with resync providing they were in different regions of the device.
There is a problem though: While a write request will always wait for conflicting resync to complete, a resync request will *not* always wait for conflicting writes to complete.
Two changes are needed to fix this:
1/ raise_barrier (which waits until it is safe to do resync)
must wait until current_window_requests is zero
2/ wait_battier (which waits at the start of a new write request)
must update current_window_requests if the request could possible conflict with a concurrent resync.
As concurrent writes and resync can lead to data loss, this patch is suitable for -stable.
--- drivers/md/raid1.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/md/raid1.c +4 -2
@@ -845,10 +845,12 @@ static void raise_barrier(struct r1conf* C: next_resync + RESYNC_SECTORS > start_next_window, meaning * next resync will reach to the window which normal bios are * handling. +* D: while there are any active requests in the current window. */ wait_event_lock_irq (conf->wait_barrier, !conf->array_frozen && conf->barrier <RESYNC_DEPTH && + conf->current_window_requests ==0 && (conf->start_next_window >= conf->next_resync +RESYNC_SECTORS ), conf->resync_lock);
@@ -915,8 +917,8 @@ static sector_t wait_barrier(struct r1co }if (bio &&bio_data_dir (bio) ==WRITE ) { -if (conf->next_resync +NEXT_NORMALIO_DISTANCE - <= bio->bi_iter.bi_sector) { +if (bio->bi_iter.bi_sector >= + conf->next_resync) {if (conf->start_next_window == MaxSector) conf->start_next_window = conf->next_resync +
Greg Kroah-Hartman
maintainerPATCH 217/238 md/raid1: Dont use next_resync to determine how far resync has progressed
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: NeilBrown <[email protected]>
commit 235549605eb7f1c5a37cef8b09d12e6d412c5cd6 upstream.
next_resync is (approximately) the location for the next resync request. However it does *not* reliably determine the earliest location at which resync might be happening.
This is because resync requests can complete out of order, and we only limit the number of current requests, not the distance from the earliest pending request to the latest.
mddev->curr_resync_completed is a reliable indicator of the earliest
position at which resync could be happening. It is updated less
frequently, but is actually reliable which is more important.
So use it to determine if a write request is before the region being resynced and so safe from conflict.
This error can allow resync IO to interfere with normal IO which could lead to data corruption. Hence: stable.
--- drivers/md/raid1.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
drivers/md/raid1.c +5 -7
@@ -875,12 +875,10 @@ static bool need_to_wait_for_sync(structif (conf->array_frozen || !bio) wait = true;else if (conf->barrier &&bio_data_dir (bio) ==WRITE ) { -if (conf->next_resync <RESYNC_WINDOW_SECTORS ) - wait = true; -else if ((conf->next_resync -RESYNC_WINDOW_SECTORS - >=bio_end_sector (bio)) || - (conf->next_resync +NEXT_NORMALIO_DISTANCE - <= bio->bi_iter.bi_sector)) +if ((conf->mddev->curr_resync_completed + >=bio_end_sector (bio)) || + (conf->next_resync +NEXT_NORMALIO_DISTANCE + <= bio->bi_iter.bi_sector)) wait = false;else wait = true;
@@ -918,7 +916,7 @@ static sector_t wait_barrier(struct r1coif (bio &&bio_data_dir (bio) ==WRITE ) {if (bio->bi_iter.bi_sector >= - conf->next_resync) { + conf->mddev->curr_resync_completed) {if (conf->start_next_window == MaxSector) conf->start_next_window = conf->next_resync +
Greg Kroah-Hartman
maintainerPATCH 218/238 md/raid1: update next_resync under resync_lock.
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: NeilBrown <[email protected]>
commit c2fd4c94deedb89ac1746c4a53219be499372c06 upstream.
raise_barrier() uses next_resync as part of its calculations, so it really should be updated first, instead of afterwards.
next_resync is always used under resync_lock so update it under resync lock to, just before it is used. That is safest.
This could cause normal IO and resync IO to interact badly so it suitable for -stable.
--- drivers/md/raid1.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/md/raid1.c +3 -3
@@ -827,7 +827,7 @@ static void flush_pending_writes(struct* there is no normal IO happeing. It must arrange to call * lower_barrier when the particular background IO completes. */ -static void raise_barrier (struct r1conf *conf) +static void raise_barrier (struct r1conf *conf,sector_t sector_nr) {spin_lock_irq (&conf->resync_lock);
@@ -837,6 +837,7 @@ static void raise_barrier(struct r1conf/* block any new IO from starting */ conf->barrier++; + conf->next_resync = sector_nr;/* For these conditions we must wait: * A: while the array is in frozen state
@@ -2542,9 +2543,8 @@ static sector_t sync_request(struct mddebitmap_cond_end_sync (mddev->bitmap, sector_nr); r1_bio =mempool_alloc (conf->r1buf_pool,GFP_NOIO ); -raise_barrier (conf); - conf->next_resync = sector_nr; +raise_barrier (conf, sector_nr);rcu_read_lock ();/*
Greg Kroah-Hartman
maintainerPATCH 219/238 md/raid1: count resync requests in nr_pending.
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: NeilBrown <[email protected]>
commit 34e97f170149bfa14979581c4c748bc9b4b79d5b upstream.
Both normal IO and resync IO can be retried with reschedule_retry() and so be counted into ->nr_queued, but only normal IO gets counted in ->nr_pending.
Before the recent improvement to RAID1 resync there could only possibly have been one or the other on the queue. When handling a read failure it could only be normal IO. So when handle_read_error() called freeze_array() the fact that freeze_array only compares ->nr_queued against ->nr_pending was safe.
But now that these two types can interleave, we can have both normal and resync IO requests queued, so we need to count them both in nr_pending.
This error can lead to freeze_array() hanging if there is a read error, so it is suitable for -stable.
--- drivers/md/raid1.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/md/raid1.c +2 -0
@@ -856,6 +856,7 @@ static void raise_barrier(struct r1conf conf->next_resync + RESYNC_SECTORS), conf->resync_lock); + conf->nr_pending++;spin_unlock_irq (&conf->resync_lock); }
@@ -865,6 +866,7 @@ static void lower_barrier(struct r1confBUG_ON (conf->barrier <=0 );spin_lock_irqsave (&conf->resync_lock, flags); conf->barrier--; + conf->nr_pending--;spin_unlock_irqrestore (&conf->resync_lock, flags);wake_up (&conf->wait_barrier); }
Greg Kroah-Hartman
maintainerPATCH 220/238 md/raid1: fix_read_error should act on all non-faulty devices.
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: NeilBrown <[email protected]>
commit b8cb6b4c121e1bf1963c16ed69e7adcb1bc301cd upstream.
If a devices is being recovered it is not InSync and is not Faulty.
If a read error is experienced on that device, fix_read_error() will be called, but it ignores non-InSync devices. So it will neither fix the error nor fail the device.
It is incorrect that fix_read_error() ignores non-InSync devices. It should only ignore Faulty devices. So fix it.
This became a bug when we allowed reading from a device that was being recovered. It is suitable for any subsequent -stable kernel.
--- drivers/md/raid1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/md/raid1.c +2 -2
@@ -2154,7 +2154,7 @@ static void fix_read_error(struct r1conf d--; rdev = conf->mirrors[d].rdev;if (rdev && -test_bit (In_sync, &rdev->flags)) + !test_bit (Faulty, &rdev->flags))r1_sync_page_io (rdev, sect, s, conf->tmppage,WRITE ); }
@@ -2166,7 +2166,7 @@ static void fix_read_error(struct r1conf d--; rdev = conf->mirrors[d].rdev;if (rdev && -test_bit (In_sync, &rdev->flags)) { + !test_bit (Faulty, &rdev->flags)) {if (r1_sync_page_io (rdev, sect, s, conf->tmppage,READ )) {atomic_add (s, &rdev->corrected_errors);
Greg Kroah-Hartman
maintainerPATCH 221/238 md/raid1: intialise start_next_window for READ case to avoid hang
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: NeilBrown <[email protected]>
commit f0cc9a057151892b885be21a1d19b0185568281d upstream.
r1_bio->start_next_window is not initialised in the READ case, so allow_barrier may incorrectly decrement
conf->current_window_requests
which can cause raise_barrier() to block forever.
--- drivers/md/raid1.c | 1 + 1 file changed, 1 insertion(+)
drivers/md/raid1.c +1 -0
@@ -1185,6 +1185,7 @@ read_again: atomic_read(&bitmap->behind_writes) == 0); } r1_bio->read_disk = rdisk; + r1_bio->start_next_window =0 ; read_bio =bio_clone_mddev (bio,GFP_NOIO , mddev); bio_trim(read_bio, r1_bio->sector - bio->bi_iter.bi_sector,
Greg Kroah-Hartman
maintainerPATCH 222/238 ipvs: avoid netns exit crash on ip_vs_conn_drop_conntrack
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Julian Anastasov <[email protected]>
commit 2627b7e15c5064ddd5e578e4efd948d48d531a3f upstream.
commit 8f4e0a18682d91 ("IPVS netns exit causes crash in conntrack") added second ip_vs_conn_drop_conntrack call instead of just adding the needed check. As result, the first call still can cause crash on netns exit. Remove it.
--- net/netfilter/ipvs/ip_vs_conn.c | 1 - 1 file changed, 1 deletion(-)
net/netfilter/ipvs/ip_vs_conn.c +0 -1
@@ -797,7 +797,6 @@ static void ip_vs_conn_expire(unsigned lip_vs_control_del (cp);if (cp->flags &IP_VS_CONN_F_NFCT ) { -ip_vs_conn_drop_conntrack (cp);/* Do not access conntracks during subsys cleanup * because nf_conntrack_find_get can not be used after * conntrack cleanup for the net.
Greg Kroah-Hartman
maintainerPATCH 223/238 netfilter: xt_hashlimit: perform garbage collection from process context
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
commit 7bd8490eef9776ced7632345df5133384b6be0fe upstream.
xt_hashlimit cannot be used with large hash tables, because garbage collector is run from a timer. If table is really big, its possible to hold cpu for more than 500 msec, which is unacceptable.
Switch to a work queue, and use proper scheduling points to remove latencies spikes.
Later, we also could switch to a smoother garbage collection done at lookup time, one bucket at a time...
--- net/netfilter/xt_hashlimit.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-)
net/netfilter/xt_hashlimit.c +16 -15
@@ -104,7 +104,7 @@ struct xt_hashlimit_htable {spinlock_t lock;/* lock for list_head */ u_int32_t rnd;/* random seed for hash */ unsigned int count;/* number entries in table */ -struct timer_list timer;/* timer for gc */ +struct delayed_work gc_work;/* seq_file stuff */ struct proc_dir_entry *pde;
@@ -213,7 +213,7 @@ dsthash_free(struct xt_hashlimit_htablecall_rcu_bh (&ent->rcu, dsthash_free_rcu); ht->count--; } -static void htable_gc (unsigned long htlong); +static void htable_gc (struct work_struct *work);static int htable_create (struct net *net,struct xt_hashlimit_mtinfo1 *minfo,u_int8_t family)
@@ -273,9 +273,9 @@ static int htable_create(struct net *net } hinfo->net = net; -setup_timer (&hinfo->timer, htable_gc, (unsigned long )hinfo); - hinfo->timer.expires = jiffies +msecs_to_jiffies (hinfo->cfg.gc_interval); -add_timer (&hinfo->timer); +INIT_DEFERRABLE_WORK (&hinfo->gc_work, htable_gc); +queue_delayed_work (system_power_efficient_wq, &hinfo->gc_work, +msecs_to_jiffies (hinfo->cfg.gc_interval));hlist_add_head (&hinfo->node, &hashlimit_net->htables);
@@ -300,29 +300,30 @@ static void htable_selective_cleanup(str {unsigned int i; -/* lock hash table and iterate over it */ -spin_lock_bh (&ht->lock);for (i =0 ; i < ht->cfg.size; i++) {struct dsthash_ent *dh;struct hlist_node *n; + +spin_lock_bh (&ht->lock);hlist_for_each_entry_safe (dh, n, &ht->hash[i], node) {if ((*select)(ht, dh))dsthash_free (ht, dh); } +spin_unlock_bh (&ht->lock); +cond_resched (); } -spin_unlock_bh (&ht->lock); } -/* hash table garbage collector, run by timer */ -static void htable_gc (unsigned long htlong) +static void htable_gc (struct work_struct *work) { -struct xt_hashlimit_htable *ht = (struct xt_hashlimit_htable *)htlong; +struct xt_hashlimit_htable *ht; + + ht = container_of(work, struct xt_hashlimit_htable, gc_work.work);htable_selective_cleanup (ht, select_gc); -/* re-add the timer accordingly */ - ht->timer.expires = jiffies +msecs_to_jiffies (ht->cfg.gc_interval); -add_timer (&ht->timer); +queue_delayed_work (system_power_efficient_wq, + &ht->gc_work,msecs_to_jiffies (ht->cfg.gc_interval)); }static void htable_remove_proc_entry (struct xt_hashlimit_htable *hinfo)
@@ -341,7 +342,7 @@ static void htable_remove_proc_entry(strstatic void htable_destroy (struct xt_hashlimit_htable *hinfo) { -del_timer_sync (&hinfo->timer); +cancel_delayed_work_sync (&hinfo->gc_work);htable_remove_proc_entry (hinfo);htable_selective_cleanup (hinfo, select_all);kfree (hinfo->name);
Greg Kroah-Hartman
maintainerPATCH 224/238 ipvs: Maintain all DSCP and ECN bits for ipv6 tun forwarding
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Gartrell <[email protected]>
commit 76f084bc10004b3050b2cff9cfac29148f1f6088 upstream.
Previously, only the four high bits of the tclass were maintained in the ipv6 case. This matches the behavior of ipv4, though whether or not we should reflect ECN bits may be up for debate.
--- net/netfilter/ipvs/ip_vs_xmit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/ipvs/ip_vs_xmit.c +1 -1
@@ -967,8 +967,8 @@ ip_vs_tunnel_xmit_v6(struct sk_buff *skb iph->nexthdr =IPPROTO_IPV6 ; iph->payload_len = old_iph->payload_len;be16_add_cpu (&iph->payload_len,sizeof (*old_iph)); - iph->priority = old_iph->priority;memset (&iph->flow_lbl,0 ,sizeof (iph->flow_lbl)); +ipv6_change_dsfield (iph,0 ,ipv6_get_dsfield (old_iph)); iph->daddr = cp->daddr.in6; iph->saddr = saddr; iph->hop_limit = old_iph->hop_limit;
Greg Kroah-Hartman
maintainerPATCH 225/238 netfilter: x_tables: allow to use default cgroup match
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Borkmann <[email protected]>
commit caa8ad94edf686d02b555c65a6162c0d1b434958 upstream.
There's actually no good reason why we cannot use cgroup id 0, so lets just remove this artificial barrier.
--- net/netfilter/xt_cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/xt_cgroup.c +1 -1
@@ -31,7 +31,7 @@ static int cgroup_mt_check(const structif (info->invert & ~1 )return -EINVAL ; -return info->id ?0 : -EINVAL ; +return 0 ; } static bool
Greg Kroah-Hartman
maintainerPATCH 226/238 ipvs: fix ipv6 hook registration for local replies
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Julian Anastasov <[email protected]>
commit eb90b0c734ad793d5f5bf230a9e9a4dcc48df8aa upstream.
commit fc604767613b6d2036cdc35b660bc39451040a47 ("ipvs: changes for local real server") from 2.6.37 introduced DNAT support to local real server but the IPv6 LOCAL_OUT handler ip_vs_local_reply6() is registered incorrectly as IPv4 hook causing any outgoing IPv4 traffic to be dropped depending on the IP header values.
Chris tracked down the problem to CONFIG_IP_VS_IPV6=y
Bug report: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1349768
--- net/netfilter/ipvs/ip_vs_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/ipvs/ip_vs_core.c +1 -1
@@ -1906,7 +1906,7 @@ static struct nf_hook_ops ip_vs_ops[] __ { .hook = ip_vs_local_reply6, .owner = THIS_MODULE, - .pf = NFPROTO_IPV4, + .pf = NFPROTO_IPV6, .hooknum = NF_INET_LOCAL_OUT, .priority = NF_IP6_PRI_NAT_DST + 1, },
Greg Kroah-Hartman
maintainerPATCH 227/238 PM / sleep: Add state field to pm_states[] entries
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Rafael J. Wysocki" <[email protected]>
commit 27ddcc6596e50cb8f03d2e83248897667811d8f6 upstream.
To allow sleep states corresponding to the "mem", "standby" and "freeze" lables to be different from the pm_states[] indexes of those strings, introduce struct pm_sleep_state, consisting of a string label and a state number, and turn pm_states[] into an array of objects of that type.
This modification should not lead to any functional changes.
--- kernel/power/main.c | 16 ++++++++-------- kernel/power/power.h | 7 ++++++- kernel/power/suspend.c | 12 ++++++------ kernel/power/suspend_test.c | 22 ++++++++++------------ 4 files changed, 30 insertions(+), 27 deletions(-)
kernel/power/main.c +8 -8
@@ -293,12 +293,12 @@ static ssize_t state_show(struct kobject {char *s = buf;#ifdef CONFIG_SUSPEND -int i; +suspend_state_t i; + +for (i =PM_SUSPEND_MIN ; i <PM_SUSPEND_MAX ; i++) +if (valid_state (i)) + s +=sprintf (s,"%s " , pm_states[i].label); -for (i =0 ; i <PM_SUSPEND_MAX ; i++) { -if (pm_states[i] &&valid_state (i)) - s +=sprintf (s,"%s " , pm_states[i]); - }#endif #ifdef CONFIG_HIBERNATION s +=sprintf (s,"%s\n" ,"disk" );
@@ -314,7 +314,7 @@ static suspend_state_t decode_state(cons {#ifdef CONFIG_SUSPEND suspend_state_t state =PM_SUSPEND_MIN ; -const char *const *s; +struct pm_sleep_state *s;#endif char *p;int len;
@@ -328,7 +328,7 @@ static suspend_state_t decode_state(cons#ifdef CONFIG_SUSPEND for (s = &pm_states[state]; state <PM_SUSPEND_MAX ; s++, state++) -if (*s && len ==strlen (*s) && !strncmp (buf, *s, len)) +if (len ==strlen (s->label) && !strncmp (buf, s->label, len))return state;#endif
@@ -448,7 +448,7 @@ static ssize_t autosleep_show(struct kob#ifdef CONFIG_SUSPEND if (state <PM_SUSPEND_MAX )return sprintf (buf,"%s\n" ,valid_state (state) ? - pm_states[state] :"error" ); + pm_states[state].label :"error" );#endif #ifdef CONFIG_HIBERNATION return sprintf (buf,"disk\n" );
kernel/power/power.h +6 -1
@@ -175,8 +175,13 @@ extern void swsusp_show_speed(struct tim unsigned int, char *);#ifdef CONFIG_SUSPEND +struct pm_sleep_state { +const char *label; +suspend_state_t state; +}; +/* kernel/power/suspend.c */ -extern const char *const pm_states[]; +extern struct pm_sleep_state pm_states[];extern bool valid_state (suspend_state_t state);extern int suspend_devices_and_enter (suspend_state_t state);
kernel/power/suspend.c +6 -6
@@ -29,10 +29,10 @@#include "power.h" -const char *const pm_states[PM_SUSPEND_MAX ] = { - [PM_SUSPEND_FREEZE ] ="freeze" , - [PM_SUSPEND_STANDBY ] ="standby" , - [PM_SUSPEND_MEM ] ="mem" , +struct pm_sleep_state pm_states[PM_SUSPEND_MAX ] = { + [PM_SUSPEND_FREEZE ] = {"freeze" ,PM_SUSPEND_FREEZE }, + [PM_SUSPEND_STANDBY ] = {"standby" ,PM_SUSPEND_STANDBY }, + [PM_SUSPEND_MEM ] = {"mem" ,PM_SUSPEND_MEM }, };static const struct platform_suspend_ops *suspend_ops;
@@ -337,7 +337,7 @@ static int enter_state(suspend_state_t ssys_sync ();printk ("done.\n" ); -pr_debug ("PM: Preparing system for %s sleep\n" , pm_states[state]); +pr_debug ("PM: Preparing system for %s sleep\n" , pm_states[state].label); error =suspend_prepare (state);if (error) goto Unlock;
@@ -345,7 +345,7 @@ static int enter_state(suspend_state_t sif (suspend_test (TEST_FREEZER )) goto Finish; -pr_debug ("PM: Entering %s sleep\n" , pm_states[state]); +pr_debug ("PM: Entering %s sleep\n" , pm_states[state].label);pm_restrict_gfp_mask (); error =suspend_devices_and_enter (state);pm_restore_gfp_mask ();
kernel/power/suspend_test.c +10 -12
@@ -92,13 +92,13 @@ static void __init test_wakealarm(struct }if (state ==PM_SUSPEND_MEM ) { -printk (info_test, pm_states[state]); +printk (info_test, pm_states[state].label); status =pm_suspend (state);if (status == -ENODEV ) state =PM_SUSPEND_STANDBY ; }if (state ==PM_SUSPEND_STANDBY ) { -printk (info_test, pm_states[state]); +printk (info_test, pm_states[state].label); status =pm_suspend (state); }if (status <0 )
@@ -136,18 +136,16 @@ static char warn_bad_state[] __initdatastatic int __init setup_test_suspend (char *value) { -unsigned i; +suspend_state_t i;/* "=mem" ==> "mem" */ value++; -for (i =0 ; i <PM_SUSPEND_MAX ; i++) { -if (!pm_states[i]) -continue ; -if (strcmp (pm_states[i], value) !=0 ) -continue ; - test_state = (__force suspend_state_t ) i; -return 0 ; - } +for (i =PM_SUSPEND_MIN ; i <PM_SUSPEND_MAX ; i++) +if (!strcmp (pm_states[i].label, value)) { + test_state = pm_states[i].state; +return 0 ; + } +printk (warn_bad_state, value);return 0 ; }
@@ -165,7 +163,7 @@ static int __init test_suspend(void)if (test_state ==PM_SUSPEND_ON ) goto done;if (!valid_state (test_state)) { -printk (warn_bad_state, pm_states[test_state]); +printk (warn_bad_state, pm_states[test_state].label); goto done; }
Greg Kroah-Hartman
maintainerPATCH 228/238 PM / sleep: Use valid_state() for platform-dependent sleep states only
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Rafael J. Wysocki" <[email protected]>
commit 43e8317b0bba1d6eb85f38a4a233d82d7c20d732 upstream.
Use the observation that, for platform-dependent sleep states (PM_SUSPEND_STANDBY, PM_SUSPEND_MEM), a given state is either always supported or always unsupported and store that information in pm_states[] instead of calling valid_state() every time we need to check it.
Also do not use valid_state() for PM_SUSPEND_FREEZE, which is always valid, and move the pm_test_level validity check for PM_SUSPEND_FREEZE directly into enter_state().
--- kernel/power/main.c | 9 +++--- kernel/power/power.h | 2 - kernel/power/suspend.c | 60 ++++++++++++++++++++++---------------------- kernel/power/suspend_test.c | 2 - 4 files changed, 36 insertions(+), 37 deletions(-)
kernel/power/main.c +5 -4
@@ -296,7 +296,7 @@ static ssize_t state_show(struct kobjectsuspend_state_t i;for (i =PM_SUSPEND_MIN ; i <PM_SUSPEND_MAX ; i++) -if (valid_state (i)) +if (pm_states[i].state) s +=sprintf (s,"%s " , pm_states[i].label);#endif
@@ -328,8 +328,9 @@ static suspend_state_t decode_state(cons#ifdef CONFIG_SUSPEND for (s = &pm_states[state]; state <PM_SUSPEND_MAX ; s++, state++) -if (len ==strlen (s->label) && !strncmp (buf, s->label, len)) -return state; +if (s->state && len ==strlen (s->label) + && !strncmp (buf, s->label, len)) +return s->state;#endif return PM_SUSPEND_ON ;
@@ -447,7 +448,7 @@ static ssize_t autosleep_show(struct kob#ifdef CONFIG_SUSPEND if (state <PM_SUSPEND_MAX ) -return sprintf (buf,"%s\n" ,valid_state (state) ? +return sprintf (buf,"%s\n" , pm_states[state].state ? pm_states[state].label :"error" );#endif #ifdef CONFIG_HIBERNATION
kernel/power/power.h +0 -2
@@ -183,14 +183,12 @@ struct pm_sleep_state {/* kernel/power/suspend.c */ extern struct pm_sleep_state pm_states[]; -extern bool valid_state (suspend_state_t state);extern int suspend_devices_and_enter (suspend_state_t state);#else /* !CONFIG_SUSPEND */ static inline int suspend_devices_and_enter (suspend_state_t state) {return -ENOSYS ; } -static inline bool valid_state (suspend_state_t state) {return false; }#endif /* !CONFIG_SUSPEND */ #ifdef CONFIG_PM_TEST_SUSPEND
kernel/power/suspend.c +30 -30
90 lines not on this page · raw message
kernel/power/suspend_test.c +1 -1
@@ -162,7 +162,7 @@ static int __init test_suspend(void)/* PM is initialized by now; is that state testable? */ if (test_state ==PM_SUSPEND_ON ) goto done; -if (!valid_state (test_state)) { +if (!pm_states[test_state].state) {printk (warn_bad_state, pm_states[test_state].label); goto done; }
Greg Kroah-Hartman
maintainerPATCH 229/238 serial: 8250_dma: check the result of TX buffer mapping
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heikki Krogerus <[email protected]>
commit d4089a332883ad969700aac5dd4dd5f1c4fee825 upstream.
Using dma_mapping_error() to make sure the mapping did not fail.
--- drivers/tty/serial/8250/8250_dma.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)
drivers/tty/serial/8250/8250_dma.c +12 -5
@@ -192,21 +192,28 @@ int serial8250_request_dma(struct uart_8 dma->rx_buf =dma_alloc_coherent (dma->rxchan->device->dev, dma->rx_size, &dma->rx_addr,GFP_KERNEL ); -if (!dma->rx_buf) { -dma_release_channel (dma->rxchan); -dma_release_channel (dma->txchan); -return -ENOMEM ; - } +if (!dma->rx_buf) + goto err;/* TX buffer */ dma->tx_addr =dma_map_single (dma->txchan->device->dev, p->port.state->xmit.buf,UART_XMIT_SIZE ,DMA_TO_DEVICE ); +if (dma_mapping_error (dma->txchan->device->dev, dma->tx_addr)) { +dma_free_coherent (dma->rxchan->device->dev, dma->rx_size, + dma->rx_buf, dma->rx_addr); + goto err; + }dev_dbg_ratelimited (p->port.dev,"got both dma channels\n" );return 0 ; +err: +dma_release_channel (dma->rxchan); +dma_release_channel (dma->txchan); + +return -ENOMEM ; }EXPORT_SYMBOL_GPL (serial8250_request_dma);
Greg Kroah-Hartman
maintainerPATCH 230/238 dmaengine: dw: introduce dwc_dostart_first_queued() helper
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andy Shevchenko <[email protected]>
commit e7637c6c0382485f4d2e20715d058dae6f2b6a7c upstream.
We have a duplicate code which starts first descriptor in the queue. Let's make this as a separate helper that can be used in future as well.
--- drivers/dma/dw/core.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-)
drivers/dma/dw/core.c +11 -8
@@ -279,6 +279,15 @@ static void dwc_dostart(struct dw_dma_chchannel_set_bit (dw,CH_EN , dwc->mask); } +static void dwc_dostart_first_queued (struct dw_dma_chan *dwc) +{ +if (list_empty (&dwc->queue)) +return ; + +list_move (dwc->queue.next, &dwc->active_list); +dwc_dostart (dwc,dwc_first_active (dwc)); +} +/*----------------------------------------------------------------------*/ static void
@@ -335,10 +344,7 @@ static void dwc_complete_all(struct dw_d* the completed ones. */ list_splice_init (&dwc->active_list, &list); -if (!list_empty (&dwc->queue)) { -list_move (dwc->queue.next, &dwc->active_list); -dwc_dostart (dwc,dwc_first_active (dwc)); - } +dwc_dostart_first_queued (dwc);spin_unlock_irqrestore (&dwc->lock, flags);
@@ -467,10 +473,7 @@ static void dwc_scan_descriptors(struct/* Try to continue after resetting the channel... */ dwc_chan_disable (dw, dwc); -if (!list_empty (&dwc->queue)) { -list_move (dwc->queue.next, &dwc->active_list); -dwc_dostart (dwc,dwc_first_active (dwc)); - } +dwc_dostart_first_queued (dwc);spin_unlock_irqrestore (&dwc->lock, flags); }
Greg Kroah-Hartman
maintainerPATCH 231/238 dmaengine: dw: dont perform DMA when dmaengine_submit is called
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andy Shevchenko <[email protected]>
commit dd8ecfcac66b4485416b2d1df0ec4798b198d7d6 upstream.
Accordingly to discussion [1] and followed up documentation the DMA controller driver shouldn't start any DMA operations when dmaengine_submit() is called.
This patch fixes the workflow in dw_dmac driver to follow the documentation.
[1] http://www.spinics.net/lists/arm-kernel/msg125987.html
--- drivers/dma/TODO | 1 - drivers/dma/dw/core.c | 19 +++++++------------ 2 files changed, 7 insertions(+), 13 deletions(-)
drivers/dma/TODO +0 -1
@@ -7,7 +7,6 @@ TODO for slave dma - imx-dma - imx-sdma - mxs-dma.c - - dw_dmac - intel_mid_dma 4. Check other subsystems for dma drivers and merge/move to dmaengine 5. Remove dma_slave_config's dma direction.
drivers/dma/dw/core.c +7 -12
@@ -680,17 +680,9 @@ static dma_cookie_t dwc_tx_submit(struct* possible, perhaps even appending to those already submitted * for DMA. But this is hard to do in a race-free manner. */ -if (list_empty (&dwc->active_list)) { -dev_vdbg (chan2dev (tx->chan),"%s: started %u\n" , __func__, - desc->txd.cookie); -list_add_tail (&desc->desc_node, &dwc->active_list); -dwc_dostart (dwc,dwc_first_active (dwc)); - }else { -dev_vdbg (chan2dev (tx->chan),"%s: queued %u\n" , __func__, - desc->txd.cookie); -list_add_tail (&desc->desc_node, &dwc->queue); - } +dev_vdbg (chan2dev (tx->chan),"%s: queued %u\n" , __func__, desc->txd.cookie); +list_add_tail (&desc->desc_node, &dwc->queue);spin_unlock_irqrestore (&dwc->lock, flags);
@@ -1095,9 +1087,12 @@ dwc_tx_status(struct dma_chan *chan,static void dwc_issue_pending (struct dma_chan *chan) {struct dw_dma_chan *dwc =to_dw_dma_chan (chan); +unsigned long flags; -if (!list_empty (&dwc->queue)) -dwc_scan_descriptors (to_dw_dma (chan->device), dwc); +spin_lock_irqsave (&dwc->lock, flags); +if (list_empty (&dwc->active_list)) +dwc_dostart_first_queued (dwc); +spin_unlock_irqrestore (&dwc->lock, flags); }static int dwc_alloc_chan_resources (struct dma_chan *chan)
Greg Kroah-Hartman
maintainerPATCH 232/238 partitions: aix.c: off by one bug
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <[email protected]>
commit d97a86c170b4e432f76db072a827fe30b4d6f659 upstream.
The lvip[] array has "state->limit" elements so the condition here should be >= instead of >.
--- block/partitions/aix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
block/partitions/aix.c +1 -1
@@ -253,7 +253,7 @@ int aix_partition(struct parsed_partitiocontinue ; } lv_ix =be16_to_cpu (p->lv_ix) -1 ; -if (lv_ix > state->limit) { +if (lv_ix >= state->limit) { cur_lv_ix =-1 ;continue ; }
Greg Kroah-Hartman
maintainerPATCH 233/238 perf/x86/intel: Use rdmsrl_safe() when initializing RAPL PMU
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Venkatesh Srinivas <[email protected]>
commit 24223657806a0ebd0ae5c9caaf7b021091889cf2 upstream.
CPUs which should support the RAPL counters according to Family/Model/Stepping may still issue #GP when attempting to access the RAPL MSRs. This may happen when Linux is running under KVM and we are passing-through host F/M/S data, for example. Use rdmsrl_safe to first access the RAPL_POWER_UNIT MSR; if this fails, do not attempt to use this PMU.
--- arch/x86/kernel/cpu/perf_event_intel_rapl.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
arch/x86/kernel/cpu/perf_event_intel_rapl.c +9 -3
@@ -511,6 +511,7 @@ static int rapl_cpu_prepare(int cpu)struct rapl_pmu *pmu =per_cpu (rapl_pmu, cpu);int phys_id =topology_physical_package_id (cpu);u64 ms; +u64 msr_rapl_power_unit_bits;if (pmu)return 0 ;
@@ -518,6 +519,9 @@ static int rapl_cpu_prepare(int cpu)if (phys_id <0 )return -1 ; +if (!rdmsrl_safe (MSR_RAPL_POWER_UNIT , &msr_rapl_power_unit_bits)) +return -1 ; + pmu =kzalloc_node (sizeof (*pmu),GFP_KERNEL ,cpu_to_node (cpu));if (!pmu)return -1 ;
@@ -531,8 +535,7 @@ static int rapl_cpu_prepare(int cpu)* * we cache in local PMU instance */ -rdmsrl (MSR_RAPL_POWER_UNIT , pmu->hw_unit); - pmu->hw_unit = (pmu->hw_unit >>8 ) &0x1FULL ; + pmu->hw_unit = (msr_rapl_power_unit_bits >>8 ) &0x1FULL ; pmu->pmu = &rapl_pmu_class;/*
@@ -649,7 +652,9 @@ static int __init rapl_pmu_init(void)get_online_cpus ();for_each_online_cpu (cpu) { -rapl_cpu_prepare (cpu); + ret =rapl_cpu_prepare (cpu); +if (ret) + goto out;rapl_cpu_init (cpu); }
@@ -672,6 +677,7 @@ static int __init rapl_pmu_init(void)hweight32 (rapl_cntr_mask), ktime_to_ms(pmu->timer_interval)); +out:put_online_cpus ();return 0 ;
Greg Kroah-Hartman
maintainerPATCH 234/238 clk: prevent erronous parsing of children during rate change
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tero Kristo <[email protected]>
commit 067bb1741c27c8d3b74ac98c0b8fc12b31e67005 upstream.
In some cases, clocks can switch their parent with clk_set_rate, for example clk_mux can do this in some cases. Current implementation of clk_change_rate uses un-safe list iteration on the clock children, which will cause wrong clocks to be parsed in case any of the clock children change their parents during the change rate operation. Fixed by using the safe list iterator instead.
The problem was detected due to some divide by zero errors generated by clock init on dra7-evm board, see discussion under
http://article.gmane.org/gmane.linux.ports.arm.kernel/349180 for details.
--- drivers/clk/clk.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/clk/clk.c +6 -1
@@ -1487,6 +1487,7 @@ static struct clk *clk_propagate_rate_chstatic void clk_change_rate (struct clk *clk) {struct clk *child; +struct hlist_node *tmp;unsigned long old_rate;unsigned long best_parent_rate =0 ;bool skip_set_rate = false;
@@ -1525,7 +1526,11 @@ static void clk_change_rate(struct clk *if (clk->notifier_count && old_rate != clk->rate)__clk_notify (clk,POST_RATE_CHANGE , old_rate, clk->rate); -hlist_for_each_entry (child, &clk->children, child_node) { +/* +* Use safe iteration, as change_rate can actually swap parents +* for certain clock types. +*/ +hlist_for_each_entry_safe (child, tmp, &clk->children, child_node) {/* Skip children who will be reparented to another clock */ if (child->new_parent && child->new_parent != clk)continue ;
Greg Kroah-Hartman
maintainerPATCH 235/238 aio: block exit_aio() until all context requests are completed
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gu Zheng <[email protected]>
commit 6098b45b32e6baeacc04790773ced9340601d511 upstream.
It seems that exit_aio() also needs to wait for all iocbs to complete (like io_destroy), but we missed the wait step in current implemention, so fix it in the same way as we did in io_destroy.
--- fs/aio.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
fs/aio.c +7 -1
@@ -797,6 +797,9 @@ void exit_aio(struct mm_struct *mm)unsigned i =0 ;while (1 ) { +struct completion requests_done = +COMPLETION_INITIALIZER_ONSTACK (requests_done); +rcu_read_lock (); table =rcu_dereference (mm->ioctx_table);
@@ -824,7 +827,10 @@ void exit_aio(struct mm_struct *mm)*/ ctx->mmap_size =0 ; -kill_ioctx (mm, ctx,NULL ); +kill_ioctx (mm, ctx, &requests_done); + +/* Wait until all IO for the context are done. */ +wait_for_completion (&requests_done); } }
Greg Kroah-Hartman
maintainerPATCH 236/238 staging/lustre: disable virtual block device for 64K pages
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnd Bergmann <[email protected]>
commit 0bf22be0da8ea74bc7ccc5b07d7855830be16eca upstream.
The lustre virtual block device cannot handle 64K pages and fails at compile time. To avoid running into this error, let's disable the Kconfig option for this driver in cases it doesn't support.
--- drivers/staging/lustre/lustre/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/staging/lustre/lustre/Kconfig +1 -0
@@ -57,4 +57,5 @@ config LUSTRE_TRANSLATE_ERRNOS config LUSTRE_LLITE_LLOOP tristate "Lustre virtual block device" depends on LUSTRE_FS && BLOCK + depends on !PPC_64K_PAGES && !ARM64_64K_PAGES default m
Greg Kroah-Hartman
maintainerPATCH 237/238 clk: qcom: Fix MN frequency tables, parent map, and jpegd
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stephen Boyd <[email protected]>
commit ff20783f7b9f35b29e768d8ecc7076c1ca1a60ca upstream.
Clocks that don't have a pre-divider don't list any pre-divider in their frequency tables, but their tables are initialized using aggregate initializers. Use tagged initializers so we properly assign the m and n values for each frequency. Furthermore, the mmcc_pxo_pll8_pll2_pll3 array improperly mapped the second element to pll2 instead of pll8, causing the clock driver to recalculate the wrong rate for any clocks using this array along with a rate that uses pll2. Plus the .num_parents field is 3 instead of 4 so you can't even switch the parent to pll3. Finally I noticed that the jpegd clock improperly indicates that the pre-divider width is only 2, when it's actually 4 bits wide.
--- drivers/clk/qcom/mmcc-msm8960.c | 82 ++++++++++++++++++++-------------------- 1 file changed, 42 insertions(+), 40 deletions(-)
drivers/clk/qcom/mmcc-msm8960.c +42 -40
@@ -37,6 +37,8 @@#define P_PLL2 2#define P_PLL3 3 +#define F_MN (f, s, _m, _n) { .freq = f, .src = s, .m = _m, .n = _n } +static u8 mmcc_pxo_pll8_pll2_map[] = { [P_PXO ] =0 , [P_PLL8 ] =2 ,
@@ -58,8 +60,8 @@ static u8 mmcc_pxo_pll8_pll2_pll3_map[]static const char *mmcc_pxo_pll8_pll2_pll3[] = {"pxo" , -"pll2" ,"pll8_vote" , +"pll2" ,"pll3" , };
@@ -709,18 +711,18 @@ static struct clk_branch csiphy2_timer_c };static struct freq_tbl clk_tbl_gfx2d[] = { - {27000000 ,P_PXO ,1 ,0 }, - {48000000 ,P_PLL8 ,1 ,8 }, - {54857000 ,P_PLL8 ,1 ,7 }, - {64000000 ,P_PLL8 ,1 ,6 }, - {76800000 ,P_PLL8 ,1 ,5 }, - {96000000 ,P_PLL8 ,1 ,4 }, - {128000000 ,P_PLL8 ,1 ,3 }, - {145455000 ,P_PLL2 ,2 ,11 }, - {160000000 ,P_PLL2 ,1 ,5 }, - {177778000 ,P_PLL2 ,2 ,9 }, - {200000000 ,P_PLL2 ,1 ,4 }, - {228571000 ,P_PLL2 ,2 ,7 }, +F_MN (27000000 ,P_PXO ,1 ,0 ), +F_MN (48000000 ,P_PLL8 ,1 ,8 ), +F_MN (54857000 ,P_PLL8 ,1 ,7 ), +F_MN (64000000 ,P_PLL8 ,1 ,6 ), +F_MN (76800000 ,P_PLL8 ,1 ,5 ), +F_MN (96000000 ,P_PLL8 ,1 ,4 ), +F_MN (128000000 ,P_PLL8 ,1 ,3 ), +F_MN (145455000 ,P_PLL2 ,2 ,11 ), +F_MN (160000000 ,P_PLL2 ,1 ,5 ), +F_MN (177778000 ,P_PLL2 ,2 ,9 ), +F_MN (200000000 ,P_PLL2 ,1 ,4 ), +F_MN (228571000 ,P_PLL2 ,2 ,7 ), { } };
@@ -841,22 +843,22 @@ static struct clk_branch gfx2d1_clk = { };static struct freq_tbl clk_tbl_gfx3d[] = { - {27000000 ,P_PXO ,1 ,0 }, - {48000000 ,P_PLL8 ,1 ,8 }, - {54857000 ,P_PLL8 ,1 ,7 }, - {64000000 ,P_PLL8 ,1 ,6 }, - {76800000 ,P_PLL8 ,1 ,5 }, - {96000000 ,P_PLL8 ,1 ,4 }, - {128000000 ,P_PLL8 ,1 ,3 }, - {145455000 ,P_PLL2 ,2 ,11 }, - {160000000 ,P_PLL2 ,1 ,5 }, - {177778000 ,P_PLL2 ,2 ,9 }, - {200000000 ,P_PLL2 ,1 ,4 }, - {228571000 ,P_PLL2 ,2 ,7 }, - {266667000 ,P_PLL2 ,1 ,3 }, - {300000000 ,P_PLL3 ,1 ,4 }, - {320000000 ,P_PLL2 ,2 ,5 }, - {400000000 ,P_PLL2 ,1 ,2 }, +F_MN (27000000 ,P_PXO ,1 ,0 ), +F_MN (48000000 ,P_PLL8 ,1 ,8 ), +F_MN (54857000 ,P_PLL8 ,1 ,7 ), +F_MN (64000000 ,P_PLL8 ,1 ,6 ), +F_MN (76800000 ,P_PLL8 ,1 ,5 ), +F_MN (96000000 ,P_PLL8 ,1 ,4 ), +F_MN (128000000 ,P_PLL8 ,1 ,3 ), +F_MN (145455000 ,P_PLL2 ,2 ,11 ), +F_MN (160000000 ,P_PLL2 ,1 ,5 ), +F_MN (177778000 ,P_PLL2 ,2 ,9 ), +F_MN (200000000 ,P_PLL2 ,1 ,4 ), +F_MN (228571000 ,P_PLL2 ,2 ,7 ), +F_MN (266667000 ,P_PLL2 ,1 ,3 ), +F_MN (300000000 ,P_PLL3 ,1 ,4 ), +F_MN (320000000 ,P_PLL2 ,2 ,5 ), +F_MN (400000000 ,P_PLL2 ,1 ,2 ), { } };
@@ -896,7 +898,7 @@ static struct clk_dyn_rcg gfx3d_src = { .hw.init = &(struct clk_init_data){ .name ="gfx3d_src" , .parent_names = mmcc_pxo_pll8_pll2_pll3, - .num_parents =3 , + .num_parents =4 , .ops = &clk_dyn_rcg_ops, }, },
@@ -994,7 +996,7 @@ static struct clk_rcg jpegd_src = { .ns_reg = 0x00ac, .p = { .pre_div_shift = 12, - .pre_div_width = 2, + .pre_div_width = 4, }, .s = { .src_sel_shift = 0,
@@ -1341,15 +1343,15 @@ static struct clk_branch hdmi_app_clk = };static struct freq_tbl clk_tbl_vcodec[] = { - {27000000 ,P_PXO ,1 ,0 }, - {32000000 ,P_PLL8 ,1 ,12 }, - {48000000 ,P_PLL8 ,1 ,8 }, - {54860000 ,P_PLL8 ,1 ,7 }, - {96000000 ,P_PLL8 ,1 ,4 }, - {133330000 ,P_PLL2 ,1 ,6 }, - {200000000 ,P_PLL2 ,1 ,4 }, - {228570000 ,P_PLL2 ,2 ,7 }, - {266670000 ,P_PLL2 ,1 ,3 }, +F_MN (27000000 ,P_PXO ,1 ,0 ), +F_MN (32000000 ,P_PLL8 ,1 ,12 ), +F_MN (48000000 ,P_PLL8 ,1 ,8 ), +F_MN (54860000 ,P_PLL8 ,1 ,7 ), +F_MN (96000000 ,P_PLL8 ,1 ,4 ), +F_MN (133330000 ,P_PLL2 ,1 ,6 ), +F_MN (200000000 ,P_PLL2 ,1 ,4 ), +F_MN (228570000 ,P_PLL2 ,2 ,7 ), +F_MN (266670000 ,P_PLL2 ,1 ,3 ), { } };
Greg Kroah-Hartman
maintainerPATCH 238/238 clk: qcom: mdp_lut_clk is a child of mdp_src
In reply to Greg Kroah-Hartman3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stephen Boyd <[email protected]>
commit f87dfcabc6f173cc811d185d33327f50a8c88399 upstream.
The mdp_lut_clk isn't a child of the mdp_clk. Instead it's the child of the mdp_src clock. Fix it.
--- drivers/clk/qcom/mmcc-msm8960.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/qcom/mmcc-msm8960.c +1 -1
@@ -1116,7 +1116,7 @@ static struct clk_branch mdp_lut_clk = { .enable_reg = 0x016c, .enable_mask = BIT(0), .hw.init = &(struct clk_init_data ){ - .parent_names = (const char *[]){"mdp_clk" }, + .parent_names = (const char *[]){"mdp_src" }, .num_parents =1 , .name ="mdp_lut_clk" , .ops = &clk_branch_ops,
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 3.14.20 release. There are 238 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sun Oct 5 21:28:26 UTC 2014. Anything received after that time might be too late.
Quoted 9 lines
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.14.20-rc1.gzand the diffstat can be found below.
thanks,
greg k-h
Compiled and booted on my test system and no dmesg regressions.
-- Shuah
Signature · 4 lines
Shuah Khan Sr. Linux Kernel Developer Samsung Research America (Silicon Valley) [email protected] | (970) 217-8978
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 3.14.20 release. There are 238 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sun Oct 5 21:28:26 UTC 2014. Anything received after that time might be too late.
Build results:
total: 137 pass: 135 fail: 2
Failed builds:
arm:omap2plus_defconfig
arm:multi_v7_defconfig
Qenu test results:
total: 28 pass: 28 fail: 0
---
Build error:
arch/arm/mach-omap2/omap_hwmod_7xx_data.c: In function 'dra7xx_hwmod_init':arch/arm/mach-omap2/omap_hwmod_7xx_data.c:2735:2: error: implicit declaration of function 'soc_is_dra74x' arch/arm/mach-omap2/omap_hwmod_7xx_data.c:2737:2: error: implicit declaration of function 'soc_is_dra72x'
Culprit:
'ARM: DRA7: hwmod: Add dra74x and dra72x specific ocp interface lists'
Needs patch af438fec6cb9 ("ARM: DRA7: Add support for soc_is_dra74x() and soc_is_dra72x() variants") as prerequisit.
Same problem is in 3.16 as well.
Guenter
Greg Kroah-Hartman
maintainerQuoted 27 lines · Guenter Roeck
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 3.14.20 release. There are 238 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sun Oct 5 21:28:26 UTC 2014. Anything received after that time might be too late.
Build results:
total: 137 pass: 135 fail: 2Failed builds:
arm:omap2plus_defconfig
arm:multi_v7_defconfigQenu test results:
total: 28 pass: 28 fail: 0---
Build error:
arch/arm/mach-omap2/omap_hwmod_7xx_data.c: In function 'dra7xx_hwmod_init':arch/arm/mach-omap2/omap_hwmod_7xx_data.c:2735:2: error: implicit declaration of function 'soc_is_dra74x'arch/arm/mach-omap2/omap_hwmod_7xx_data.c:2737:2: error: implicit declaration of function 'soc_is_dra72x'
Quoted 8 lines
Culprit:
'ARM: DRA7: hwmod: Add dra74x and dra72x specific ocp interface lists'
Needs patch
af438fec6cb9("ARM: DRA7: Add support forsoc_is_dra74x()andsoc_is_dra72x()variants") as prerequisit.Same problem is in 3.16 as well.
Thanks, I've added this to 3.14 and 3.16-stable queues now.
greg k-h