Linux 4.4.94
Greg KH
maintainerI'm announcing the release of the 4.4.94 kernel.
All users of the 4.4 kernel series must upgrade.
The updated 4.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.4.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/mips/include/asm/irq.h | 2 arch/sparc/include/asm/setup.h | 5 - arch/sparc/kernel/smp_64.c | 6 + block/bsg-lib.c | 1 crypto/Kconfig | 1 drivers/cpufreq/Kconfig.arm | 2 drivers/gpu/drm/drm_dp_mst_topology.c | 2 drivers/i2c/busses/i2c-at91.c | 3 drivers/iio/adc/xilinx-xadc-core.c | 6 - drivers/irqchip/irq-crossbar.c | 3 drivers/isdn/i4l/isdn_ppp.c | 37 ++++++--- drivers/md/linear.c | 3 drivers/net/ethernet/ibm/emac/mal.c | 3 drivers/net/ethernet/marvell/mvpp2.c | 9 -- drivers/net/ethernet/mellanox/mlx4/en_clock.c | 18 +--- drivers/net/ethernet/mellanox/mlx4/main.c | 2 drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 1 drivers/net/tun.c | 8 + drivers/net/wireless/mac80211_hwsim.c | 28 +++++- drivers/scsi/device_handler/scsi_dh_emc.c | 2 drivers/target/iscsi/iscsi_target_erl0.c | 6 - drivers/tty/goldfish.c | 2 drivers/tty/serial/sunhv.c | 6 + drivers/watchdog/kempld_wdt.c | 9 +- fs/btrfs/send.c | 5 - fs/ceph/mds_client.c | 9 +- fs/f2fs/data.c | 7 + fs/nfsd/nfs4callback.c | 8 + fs/nfsd/nfs4state.c | 10 +- fs/nfsd/state.h | 1 fs/ocfs2/dlmglue.c | 105 +++++++++++++++++++++++++- fs/ocfs2/dlmglue.h | 18 ++++ fs/ocfs2/ocfs2.h | 1 include/asm-generic/percpu.h | 24 +++++ include/linux/trace_events.h | 1 include/net/sctp/ulpevent.h | 6 + include/uapi/linux/mroute6.h | 1 include/uapi/linux/rds.h | 3 kernel/bpf/verifier.c | 3 kernel/events/core.c | 3 kernel/locking/lockdep.c | 11 ++ mm/slab_common.c | 5 - net/core/sock.c | 2 net/ipv4/ip_vti.c | 3 net/ipv6/ip6_gre.c | 21 ++--- net/ipv6/ip6_vti.c | 3 net/ipv6/udp.c | 1 net/l2tp/l2tp_core.c | 14 +-- net/l2tp/l2tp_core.h | 5 - net/mac80211/sta_info.c | 2 net/netfilter/nf_conntrack_expect.c | 4 net/packet/af_packet.c | 28 ++++-- net/tipc/msg.c | 2 54 files changed, 361 insertions(+), 112 deletions(-)
Alexander Potapenko (1):
tun: bail out from tun_get_user() if the skb is empty
Alexandre Belloni (1):
i2c: at91: ensure state is restored after suspending
Alexey Kodanev (1):
vti: fix use after free in vti_tunnel_xmit/vti6_tnl_xmit
Arnd Bergmann (2):
watchdog: kempld: fix gcc-4.3 build
cpufreq: CPPC: add ACPI_PROCESSOR dependency
Christian Lamparter (1):
net: emac: Fix napi poll list corruption
Christoph Paasch (1):
net: Set sk_prot_creator when cloning sockets to the right proto
Christophe JAILLET (1):
iio: adc: xilinx: Fix error handling
Dan Carpenter (2):
sctp: potential read out of bounds in sctp_ulpevent_type_enabled()
scsi: scsi_dh_emc: return success in clariion_std_inquiry()
Dmitry V. Levin (2):
uapi: fix linux/rds.h userspace compilation errors
uapi: fix linux/mroute6.h userspace compilation errors
Edward Cree (1):
bpf/verifier: reject BPF_ALU64|BPF_END
Emmanuel Grumbach (1):
mac80211: fix power saving clients handling in iwlwifi
Eric Dumazet (1):
net/mlx4_en: fix overflow in mlx4_en_init_timestamp()
Eric Ren (1):
ocfs2/dlmglue: prepare tracking logic to avoid recursive cluster lock
Franck Demathieu (1):
irqchip/crossbar: Fix incorrect type of local variables
Greg Kroah-Hartman (3):
Revert "bsg-lib: don't free job in bsg_prepare_job" Revert "tty: goldfish: Fix a parameter of a call to free_irq" Linux 4.4.94
Grygorii Maistrenko (1):
slub: do not merge cache if slub_debug contains a never-merge flag
Harry Wentland (1):
drm/dp/mst: save vcpi with payloads
Jaegeuk Kim (1):
f2fs: do not wait for writeback in write_begin
Jarno Rajahalme (1):
netfilter: nf_ct_expect: Change __nf_ct_expect_check() return value.
Jeff Layton (1):
ceph: clean up unsafe d_parent accesses in build_dentry_path
Johannes Berg (1):
mac80211_hwsim: check HWSIM_ATTR_RADIO_NAME length
Kinglong Mee (1):
nfsd/callback: Cleanup callback cred on shutdown
Majd Dibbiny (1):
net/mlx4_core: Fix VF overwrite of module param which disables DMFS on new probed PFs
Mark Rutland (1):
percpu: make this_cpu_generic_read() atomic w.r.t. interrupts
Matt Redfearn (1):
MIPS: Fix minimum alignment requirement of IRQ stack
Meng Xu (1):
isdn/i4l: fetch the ppp_write buffer in one shot
Milan Broz (1):
crypto: xts - Add ECB dependency
Parthasarathy Bhuvaragan (1):
tipc: use only positive error codes in messages
Peter Zijlstra (1):
locking/lockdep: Add nest_lock integrity test
Ridge Kennedy (1):
l2tp: Avoid schedule while atomic in exit_net
Robbie Ko (1):
Btrfs: send, fix failure to rename top level inode due to name collision
Sabrina Dubroca (1):
l2tp: fix race condition in l2tp_tunnel_delete
Shaohua Li (1):
md/linear: shutup lockdep warnning
Subash Abhinov Kasiviswanathan (1):
udpv6: Fix the checksum computation when HW checksum does not apply
Thomas Petazzoni (1):
net: mvpp2: release reference to txq_cpu[] entry after unmapping
Varun Prakash (1):
target/iscsi: Fix unsolicited data seq_end_offset calculation
Vijay Kumar (1):
sparc64: Migrate hvcons irq to panicked cpu
Willem de Bruijn (3):
packet: hold bind lock when rebinding to fanout hook
packet: in packet_do_bind, test fanout with bind_lock held
packet: only test po->has_vnet_hdr once in packet_snd
Xin Long (1):
ip6_gre: skb_push ipv6hdr before packing the header in ip6gre_header
Yonghong Song (1):
bpf: one perf event close won't free bpf program attached by another perf event
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 93 +SUBLEVEL = 94 EXTRAVERSION = NAME = Blurry Fish Butt
arch/mips/include/asm/irq.h +1 -1
@@ -18,7 +18,7 @@#include <irq.h> #define IRQ_STACK_SIZE THREAD_SIZE -#define IRQ_STACK_START (IRQ_STACK_SIZE - sizeof(unsigned long)) +#define IRQ_STACK_START (IRQ_STACK_SIZE - 16)extern void *irq_stack[NR_CPUS ];
arch/sparc/include/asm/setup.h +4 -1
@@ -59,8 +59,11 @@ extern atomic_t dcpage_flushes;extern atomic_t dcpage_flushes_xcall;extern int sysctl_tsb_ratio; -#endif +#ifdef CONFIG_SERIAL_SUNHV +void sunhv_migrate_hvcons_irq (int cpu); +#endif +#endif void sun_do_break (void );extern int stop_a_enabled;extern int scons_pwroff;
arch/sparc/kernel/smp_64.c +5 -1
@@ -1443,8 +1443,12 @@ void smp_send_stop(void)int cpu;if (tlb_type == hypervisor) { +int this_cpu =smp_processor_id (); +#ifdef CONFIG_SERIAL_SUNHV +sunhv_migrate_hvcons_irq (this_cpu); +#endif for_each_online_cpu (cpu) { -if (cpu ==smp_processor_id ()) +if (cpu == this_cpu)continue ;#ifdef CONFIG_SUN_LDOMS if (ldom_domaining_enabled) {
block/bsg-lib.c +1 -0
@@ -147,6 +147,7 @@ static int bsg_create_job(struct device *dev, struct request *req) failjob_rls_rqst_payload:kfree (job->request_payload.sg_list); failjob_rls_job: +kfree (job);return -ENOMEM ; }
crypto/Kconfig +1 -0
@@ -343,6 +343,7 @@ config CRYPTO_XTS select CRYPTO_BLKCIPHER select CRYPTO_MANAGER select CRYPTO_GF128MUL + select CRYPTO_ECB help XTS: IEEE1619/D16 narrow block cipher use with aes-xts-plain, key size 256, 384 or 512 bits. This implementation currently
drivers/cpufreq/Kconfig.arm +1 -1
@@ -241,7 +241,7 @@ config ARM_PXA2xx_CPUFREQ config ACPI_CPPC_CPUFREQ tristate "CPUFreq driver based on the ACPI CPPC spec" - depends on ACPI + depends on ACPI_PROCESSOR select ACPI_CPPC_LIB default n help
drivers/gpu/drm/drm_dp_mst_topology.c +2 -0
@@ -1802,6 +1802,7 @@ int drm_dp_update_payload_part1(struct drm_dp_mst_topology_mgr *mgr)return -EINVAL ; } req_payload.num_slots = mgr->proposed_vcpis[i]->num_slots; + req_payload.vcpi = mgr->proposed_vcpis[i]->vcpi; }else { port =NULL ; req_payload.num_slots =0 ;
@@ -1817,6 +1818,7 @@ int drm_dp_update_payload_part1(struct drm_dp_mst_topology_mgr *mgr)if (req_payload.num_slots) {drm_dp_create_payload_step1 (mgr, mgr->proposed_vcpis[i]->vcpi, &req_payload); mgr->payloads[i].num_slots = req_payload.num_slots; + mgr->payloads[i].vcpi = req_payload.vcpi; }else if (mgr->payloads[i].num_slots) { mgr->payloads[i].num_slots =0 ;drm_dp_destroy_payload_step1 (mgr, port, mgr->payloads[i].vcpi, &mgr->payloads[i]);
drivers/i2c/busses/i2c-at91.c +3 -0
@@ -1131,6 +1131,7 @@ static int at91_twi_suspend_noirq(struct device *dev)static int at91_twi_resume_noirq (struct device *dev) { +struct at91_twi_dev *twi_dev =dev_get_drvdata (dev);int ret;if (!pm_runtime_status_suspended (dev)) {
@@ -1142,6 +1143,8 @@ static int at91_twi_resume_noirq(struct device *dev)pm_runtime_mark_last_busy (dev);pm_request_autosuspend (dev); +at91_init_twi_bus (twi_dev); +return 0 ; }
drivers/iio/adc/xilinx-xadc-core.c +3 -3
@@ -1208,7 +1208,7 @@ static int xadc_probe(struct platform_device *pdev) ret = xadc->ops->setup (pdev, indio_dev, irq);if (ret) - goto err_free_samplerate_trigger; + goto err_clk_disable_unprepare; ret =request_irq (irq, xadc->ops->interrupt_handler,0 ,dev_name (&pdev->dev), indio_dev);
@@ -1268,6 +1268,8 @@ static int xadc_probe(struct platform_device *pdev) err_free_irq:free_irq (irq, indio_dev); +err_clk_disable_unprepare: +clk_disable_unprepare (xadc->clk); err_free_samplerate_trigger:if (xadc->ops->flags &XADC_FLAGS_BUFFERED )iio_trigger_free (xadc->samplerate_trigger);
@@ -1277,8 +1279,6 @@ err_free_convst_trigger: err_triggered_buffer_cleanup:if (xadc->ops->flags &XADC_FLAGS_BUFFERED )iio_triggered_buffer_cleanup (indio_dev); -err_clk_disable_unprepare: -clk_disable_unprepare (xadc->clk); err_device_free:kfree (indio_dev->channels);
drivers/irqchip/irq-crossbar.c +2 -1
@@ -198,7 +198,8 @@ static const struct irq_domain_ops crossbar_domain_ops = {static int __init crossbar_of_init (struct device_node *node) { -int i, size, max =0 , reserved =0 , entry; +int i, size, reserved =0 ; +u32 max =0 , entry;const __be32 *irqsr;int ret = -ENOMEM ;
drivers/isdn/i4l/isdn_ppp.c +25 -12
@@ -828,7 +828,6 @@ isdn_ppp_write(int min, struct file *file, const char __user *buf, int count)isdn_net_local *lp;struct ippp_struct *is;int proto; -unsigned char protobuf[4 ]; is = file->private_data;
@@ -842,24 +841,28 @@ isdn_ppp_write(int min, struct file *file, const char __user *buf, int count)if (!lp)printk (KERN_DEBUG "isdn_ppp_write: lp == NULL\n" );else { -/* -* Don't reset huptimer for -* LCP packets. (Echo requests). -*/ -if (copy_from_user (protobuf, buf,4 )) -return -EFAULT ; - proto =PPP_PROTOCOL (protobuf); -if (proto !=PPP_LCP ) - lp->huptimer =0 ; +if (lp->isdn_device <0 || lp->isdn_channel <0 ) { +unsigned char protobuf[4 ]; +/* +* Don't reset huptimer for +* LCP packets. (Echo requests). +*/ +if (copy_from_user (protobuf, buf,4 )) +return -EFAULT ; + + proto =PPP_PROTOCOL (protobuf); +if (proto !=PPP_LCP ) + lp->huptimer =0 ; -if (lp->isdn_device <0 || lp->isdn_channel <0 )return 0 ; + }if ((dev->drv[lp->isdn_device]->flags &DRV_FLAG_RUNNING ) && lp->dialstate ==0 && (lp->flags &ISDN_NET_CONNECTED )) {unsigned short hl;struct sk_buff *skb; +unsigned char *cpy_buf;/* * we need to reserve enough space in front of * sk_buff. old call to dev_alloc_skb only reserved
@@ -872,11 +875,21 @@ isdn_ppp_write(int min, struct file *file, const char __user *buf, int count)return count; }skb_reserve (skb, hl); -if (copy_from_user (skb_put (skb, count), buf, count)) + cpy_buf =skb_put (skb, count); +if (copy_from_user (cpy_buf, buf, count)) {kfree_skb (skb);return -EFAULT ; } + +/* +* Don't reset huptimer for +* LCP packets. (Echo requests). +*/ + proto =PPP_PROTOCOL (cpy_buf); +if (proto !=PPP_LCP ) + lp->huptimer =0 ; +if (is->debug &0x40 ) {printk (KERN_DEBUG "ppp xmit: len %d\n" , (int ) skb->len);isdn_ppp_frame_log ("xmit" , skb->data, skb->len,32 , is->unit, lp->ppp_slot);
drivers/md/linear.c +2 -1
@@ -223,7 +223,8 @@ static int linear_add(struct mddev *mddev, struct md_rdev *rdev)* oldconf until no one uses it anymore. */ mddev_suspend (mddev); - oldconf =rcu_dereference (mddev->private); + oldconf =rcu_dereference_protected (mddev->private, +lockdep_is_held (&mddev->reconfig_mutex)); mddev->raid_disks++;WARN_ONCE (mddev->raid_disks != newconf->raid_disks,"copied raid_disks doesn't match mddev->raid_disks" );
drivers/net/ethernet/ibm/emac/mal.c +1 -2
@@ -402,7 +402,7 @@ static int mal_poll(struct napi_struct *napi, int budget)unsigned long flags;MAL_DBG2 (mal,"poll(%d)" NL , budget); - again: +/* Process TX skbs */ list_for_each (l, &mal->poll_list) { struct mal_commac *mc =
@@ -451,7 +451,6 @@ static int mal_poll(struct napi_struct *napi, int budget)spin_lock_irqsave (&mal->lock, flags);mal_disable_eob_irq (mal);spin_unlock_irqrestore (&mal->lock, flags); - goto again; } mc->ops->poll_tx (mc->dev); }
drivers/net/ethernet/marvell/mvpp2.c +4 -5
@@ -4415,13 +4415,12 @@ static void mvpp2_txq_bufs_free(struct mvpp2_port *port,struct mvpp2_txq_pcpu_buf *tx_buf = txq_pcpu->buffs + txq_pcpu->txq_get_index; -mvpp2_txq_inc_get (txq_pcpu); -dma_unmap_single (port->dev->dev.parent, tx_buf->phys, tx_buf->size,DMA_TO_DEVICE ); -if (!tx_buf->skb) -continue ; -dev_kfree_skb_any (tx_buf->skb); +if (tx_buf->skb) +dev_kfree_skb_any (tx_buf->skb); + +mvpp2_txq_inc_get (txq_pcpu); } }
drivers/net/ethernet/mellanox/mlx4/en_clock.c +8 -10
@@ -88,10 +88,17 @@ void mlx4_en_remove_timestamp(struct mlx4_en_dev *mdev) } } +#define MLX4_EN_WRAP_AROUND_SEC 10UL +/* By scheduling the overflow check every 5 seconds, we have a reasonably +* good chance we wont miss a wrap around. +* TOTO: Use a timer instead of a work queue to increase the guarantee. +*/ +#define MLX4_EN_OVERFLOW_PERIOD (MLX4_EN_WRAP_AROUND_SEC * HZ / 2) +void mlx4_en_ptp_overflow_check (struct mlx4_en_dev *mdev) {bool timeout =time_is_before_jiffies (mdev->last_overflow_check + - mdev->overflow_period); +MLX4_EN_OVERFLOW_PERIOD );unsigned long flags;if (timeout) {
@@ -236,7 +243,6 @@ static const struct ptp_clock_info mlx4_en_ptp_clock_info = { .enable = mlx4_en_phc_enable, }; -#define MLX4_EN_WRAP_AROUND_SEC 10ULL/* This function calculates the max shift that enables the user range * of MLX4_EN_WRAP_AROUND_SEC values in the cycles register.
@@ -258,7 +264,6 @@ void mlx4_en_init_timestamp(struct mlx4_en_dev *mdev) {struct mlx4_dev *dev = mdev->dev;unsigned long flags; -u64 ns, zero =0 ;/* mlx4_en_init_timestamp is called for each netdev. * mdev->ptp_clock is common for all ports, skip initialization if
@@ -282,13 +287,6 @@ void mlx4_en_init_timestamp(struct mlx4_en_dev *mdev) ktime_to_ns(ktime_get_real()));write_unlock_irqrestore (&mdev->clock_lock, flags); -/* Calculate period in seconds to call the overflow watchdog - to make -* sure counter is checked at least once every wrap around. -*/ - ns =cyclecounter_cyc2ns (&mdev->cycles, mdev->cycles.mask, zero, &zero); -do_div (ns,NSEC_PER_SEC /2 /HZ ); - mdev->overflow_period = ns; -/* Configure the PHC */ mdev->ptp_clock_info = mlx4_en_ptp_clock_info;snprintf (mdev->ptp_clock_info.name,16 ,"mlx4 ptp" );
drivers/net/ethernet/mellanox/mlx4/main.c +0 -2
@@ -791,8 +791,6 @@ static int mlx4_slave_cap(struct mlx4_dev *dev)return -ENOSYS ; } - mlx4_log_num_mgm_entry_size = hca_param.log_mc_entry_sz; - dev->caps.hca_core_clock = hca_param.hca_core_clock;memset (&dev_cap,0 ,sizeof (dev_cap));
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h +0 -1
@@ -409,7 +409,6 @@ struct mlx4_en_dev {struct cyclecounter cycles;struct timecounter clock;unsigned long last_overflow_check; -unsigned long overflow_period;struct ptp_clock *ptp_clock;struct ptp_clock_info ptp_clock_info;struct notifier_block nb;
drivers/net/tun.c +5 -3
@@ -1195,11 +1195,13 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,switch (tun->flags &TUN_TYPE_MASK ) {case IFF_TUN :if (tun->flags &IFF_NO_PI ) { -switch (skb->data[0 ] &0xf0 ) { -case 0x40 : +u8 ip_version = skb->len ? (skb->data[0 ] >>4 ) :0 ; + +switch (ip_version) { +case 4 : pi.proto =htons (ETH_P_IP );break ; -case 0x60 : +case 6 : pi.proto =htons (ETH_P_IPV6 );break ;default :
drivers/net/wireless/mac80211_hwsim.c +21 -7
@@ -2884,6 +2884,7 @@ static int hwsim_register_received_nl(struct sk_buff *skb_2,static int hwsim_new_radio_nl (struct sk_buff *msg,struct genl_info *info) {struct hwsim_new_radio_params param = {0 }; +const char *hwname =NULL ; param.reg_strict = info->attrs[HWSIM_ATTR_REG_STRICT_REG ]; param.p2p_device = info->attrs[HWSIM_ATTR_SUPPORT_P2P_DEVICE ];
@@ -2897,8 +2898,14 @@ static int hwsim_new_radio_nl(struct sk_buff *msg, struct genl_info *info)if (info->attrs[HWSIM_ATTR_NO_VIF ]) param.no_vif = true; -if (info->attrs[HWSIM_ATTR_RADIO_NAME ]) - param.hwname =nla_data (info->attrs[HWSIM_ATTR_RADIO_NAME ]); +if (info->attrs[HWSIM_ATTR_RADIO_NAME ]) { + hwname =kasprintf (GFP_KERNEL ,"%.*s" , +nla_len (info->attrs[HWSIM_ATTR_RADIO_NAME ]), + (char *)nla_data (info->attrs[HWSIM_ATTR_RADIO_NAME ])); +if (!hwname) +return -ENOMEM ; + param.hwname = hwname; + }if (info->attrs[HWSIM_ATTR_USE_CHANCTX ]) param.use_chanctx = true;
@@ -2926,11 +2933,15 @@ static int hwsim_del_radio_nl(struct sk_buff *msg, struct genl_info *info)s64 idx =-1 ;const char *hwname =NULL ; -if (info->attrs[HWSIM_ATTR_RADIO_ID ]) +if (info->attrs[HWSIM_ATTR_RADIO_ID ]) { idx =nla_get_u32 (info->attrs[HWSIM_ATTR_RADIO_ID ]); -else if (info->attrs[HWSIM_ATTR_RADIO_NAME ]) - hwname = (void *)nla_data (info->attrs[HWSIM_ATTR_RADIO_NAME ]); -else + }else if (info->attrs[HWSIM_ATTR_RADIO_NAME ]) { + hwname =kasprintf (GFP_KERNEL ,"%.*s" , +nla_len (info->attrs[HWSIM_ATTR_RADIO_NAME ]), + (char *)nla_data (info->attrs[HWSIM_ATTR_RADIO_NAME ])); +if (!hwname) +return -ENOMEM ; + }else return -EINVAL ;spin_lock_bh (&hwsim_radio_lock);
@@ -2939,7 +2950,8 @@ static int hwsim_del_radio_nl(struct sk_buff *msg, struct genl_info *info)if (data->idx != idx)continue ; }else { -if (strcmp (hwname,wiphy_name (data->hw->wiphy))) +if (!hwname || +strcmp (hwname,wiphy_name (data->hw->wiphy)))continue ; }
@@ -2947,10 +2959,12 @@ static int hwsim_del_radio_nl(struct sk_buff *msg, struct genl_info *info)spin_unlock_bh (&hwsim_radio_lock);mac80211_hwsim_del_radio (data,wiphy_name (data->hw->wiphy), info); +kfree (hwname);return 0 ; }spin_unlock_bh (&hwsim_radio_lock); +kfree (hwname);return -ENODEV ; }
drivers/scsi/device_handler/scsi_dh_emc.c +1 -1
@@ -456,7 +456,7 @@ static int clariion_prep_fn(struct scsi_device *sdev, struct request *req)static int clariion_std_inquiry (struct scsi_device *sdev,struct clariion_dh_data *csdev) { -int err; +int err =SCSI_DH_OK ;char *sp_model; err =send_inquiry_cmd (sdev,0 , csdev);
drivers/target/iscsi/iscsi_target_erl0.c +2 -4
@@ -44,10 +44,8 @@ void iscsit_set_dataout_sequence_values(*/ if (cmd->unsolicited_data) { cmd->seq_start_offset = cmd->write_data_done; - cmd->seq_end_offset = (cmd->write_data_done + - ((cmd->se_cmd.data_length > - conn->sess->sess_ops->FirstBurstLength) ? - conn->sess->sess_ops->FirstBurstLength : cmd->se_cmd.data_length)); + cmd->seq_end_offset =min (cmd->se_cmd.data_length, + conn->sess->sess_ops->FirstBurstLength);return ; }
drivers/tty/goldfish.c +1 -1
@@ -293,7 +293,7 @@ static int goldfish_tty_probe(struct platform_device *pdev)return 0 ; err_tty_register_device_failed: -free_irq (irq, qtty); +free_irq (irq, pdev); err_request_irq_failed: goldfish_tty_current_line_count--;if (goldfish_tty_current_line_count ==0 )
drivers/tty/serial/sunhv.c +6 -0
@@ -398,6 +398,12 @@ static struct uart_driver sunhv_reg = {static struct uart_port *sunhv_port; +void sunhv_migrate_hvcons_irq (int cpu) +{ +/* Migrate hvcons irq to param cpu */ +irq_force_affinity (sunhv_port->irq,cpumask_of (cpu)); +} +/* Copy 's' into the con_write_page, decoding "\n" into * "\r\n" along the way. We have to return two lengths * because the caller needs to know how much to advance
drivers/watchdog/kempld_wdt.c +8 -1
@@ -140,12 +140,19 @@ static int kempld_wdt_set_stage_timeout(struct kempld_wdt_data *wdt_data, unsigned int timeout) {struct kempld_device_data *pld = wdt_data->pld; -u32 prescaler = kempld_prescaler[PRESCALER_21 ]; +u32 prescaler;u64 stage_timeout64;u32 stage_timeout;u32 remainder;u8 stage_cfg; +#if GCC_VERSION <40400 +/* work around a bug compiling do_div() */ + prescaler =READ_ONCE (kempld_prescaler[PRESCALER_21 ]); +#else + prescaler = kempld_prescaler[PRESCALER_21 ]; +#endif +if (!stage)return -EINVAL ;
fs/btrfs/send.c +4 -1
@@ -1648,6 +1648,9 @@ static int is_inode_existent(struct send_ctx *sctx, u64 ino, u64 gen) {int ret; +if (ino ==BTRFS_FIRST_FREE_OBJECTID ) +return 1 ; + ret =get_cur_inode_state (sctx, ino, gen);if (ret <0 ) goto out;
@@ -1833,7 +1836,7 @@ static int will_overwrite_ref(struct send_ctx *sctx, u64 dir, u64 dir_gen,* not delted and then re-created, if it was then we have no overwrite * and we can just unlink this entry. */ -if (sctx->parent_root) { +if (sctx->parent_root && dir !=BTRFS_FIRST_FREE_OBJECTID ) { ret =get_inode_info (sctx->parent_root, dir,NULL , &gen,NULL ,NULL ,NULL ,NULL );if (ret <0 && ret != -ENOENT )
fs/ceph/mds_client.c +7 -2
@@ -1845,13 +1845,18 @@ static int build_dentry_path(struct dentry *dentry, int *pfreepath) {char *path; +struct inode *dir; -if (ceph_snap (d_inode (dentry->d_parent)) ==CEPH_NOSNAP ) { - *pino =ceph_ino (d_inode (dentry->d_parent)); +rcu_read_lock (); + dir =d_inode_rcu (dentry->d_parent); +if (dir &&ceph_snap (dir) ==CEPH_NOSNAP ) { + *pino =ceph_ino (dir); +rcu_read_unlock (); *ppath = dentry->d_name.name; *ppathlen = dentry->d_name.len;return 0 ; } +rcu_read_unlock (); path =ceph_mdsc_build_path (dentry, ppathlen, pino,1 );if (IS_ERR (path))return PTR_ERR (path);
fs/f2fs/data.c +6 -1
@@ -1416,7 +1416,12 @@ static int f2fs_write_begin(struct file *file, struct address_space *mapping, goto fail; } repeat: - page =grab_cache_page_write_begin (mapping, index, flags); +/* +* Do not use grab_cache_page_write_begin() to avoid deadlock due to +* wait_for_stable_page. Will wait that below with our IO control. +*/ + page =pagecache_get_page (mapping, index, +FGP_LOCK |FGP_WRITE |FGP_CREAT ,GFP_NOFS );if (!page) { err = -ENOMEM ; goto fail;
fs/nfsd/nfs4callback.c +8 -0
@@ -696,6 +696,14 @@ int set_callback_cred(void)return 0 ; } +void cleanup_callback_cred (void ) +{ +if (callback_cred) { +put_rpccred (callback_cred); + callback_cred =NULL ; + } +} +static struct rpc_cred *get_backchannel_cred (struct nfs4_client *clp,struct rpc_clnt *client,struct nfsd4_session *ses) {if (clp->cl_minorversion ==0 ) {
fs/nfsd/nfs4state.c +6 -4
@@ -6792,23 +6792,24 @@ nfs4_state_start(void) ret =set_callback_cred ();if (ret) -return -ENOMEM ; +return ret; + laundry_wq =alloc_workqueue ("%s" ,WQ_UNBOUND ,0 ,"nfsd4" );if (laundry_wq ==NULL ) { ret = -ENOMEM ; - goto out_recovery; + goto out_cleanup_cred; } ret =nfsd4_create_callback_queue ();if (ret) goto out_free_laundry;set_max_delegations (); -return 0 ; out_free_laundry:destroy_workqueue (laundry_wq); -out_recovery: +out_cleanup_cred: +cleanup_callback_cred ();return ret; }
@@ -6847,6 +6848,7 @@ nfs4_state_shutdown(void) {destroy_workqueue (laundry_wq);nfsd4_destroy_callback_queue (); +cleanup_callback_cred (); } static void
fs/nfsd/state.h +1 -0
@@ -595,6 +595,7 @@ extern struct nfs4_client_reclaim *nfsd4_find_reclaim_client(const char *recdir,extern __be32 nfs4_check_open_reclaim (clientid_t *clid,struct nfsd4_compound_state *cstate,struct nfsd_net *nn);extern int set_callback_cred (void ); +extern void cleanup_callback_cred (void );extern void nfsd4_probe_callback (struct nfs4_client *clp);extern void nfsd4_probe_callback_sync (struct nfs4_client *clp);extern void nfsd4_change_callback (struct nfs4_client *clp,struct nfs4_cb_conn *);
fs/ocfs2/dlmglue.c +102 -3
135 lines not on this page · raw message
fs/ocfs2/dlmglue.h +18 -0
@@ -70,6 +70,11 @@ struct ocfs2_orphan_scan_lvb {__be32 lvb_os_seqno; }; +struct ocfs2_lock_holder { +struct list_head oh_list; +struct pid *oh_owner_pid; +}; +/* ocfs2_inode_lock_full() 'arg_flags' flags */ /* don't wait on recovery. */ #define OCFS2_META_LOCK_RECOVERY (0x01)
@@ -77,6 +82,8 @@ struct ocfs2_orphan_scan_lvb {#define OCFS2_META_LOCK_NOQUEUE (0x02)/* don't block waiting for the downconvert thread, instead return -EAGAIN */ #define OCFS2_LOCK_NONBLOCK (0x04) +/* just get back disk inode bh if we've got cluster lock. */ +#define OCFS2_META_LOCK_GETBH (0x08)/* Locking subclasses of inode cluster lock */ enum {
@@ -170,4 +177,15 @@ void ocfs2_put_dlm_debug(struct ocfs2_dlm_debug *dlm_debug);/* To set the locking protocol on module initialization */ void ocfs2_set_locking_protocol (void ); + +/* The _tracker pair is used to avoid cluster recursive locking */ +int ocfs2_inode_lock_tracker (struct inode *inode, +struct buffer_head **ret_bh, +int ex, +struct ocfs2_lock_holder *oh); +void ocfs2_inode_unlock_tracker (struct inode *inode, +int ex, +struct ocfs2_lock_holder *oh, +int had_lock); +#endif /* DLMGLUE_H */
fs/ocfs2/ocfs2.h +1 -0
@@ -172,6 +172,7 @@ struct ocfs2_lock_res {struct list_head l_blocked_list;struct list_head l_mask_waiters; +struct list_head l_holders;unsigned long l_flags;char l_name[OCFS2_LOCK_ID_MAX_LEN ];
include/asm-generic/percpu.h +22 -2
@@ -105,15 +105,35 @@ do { \ (__ret); \ }) -#define this_cpu_generic_read (pcp) \ +#define __this_cpu_generic_read_nopreempt (pcp) \ ({ \ typeof(pcp) __ret; \ preempt_disable(); \ - __ret = *this_cpu_ptr(&(pcp)); \ + __ret = READ_ONCE(*raw_cpu_ptr(&(pcp))); \ preempt_enable(); \ __ret; \ }) +#define __this_cpu_generic_read_noirq (pcp) \ +({ \ + typeof(pcp) __ret; \ + unsigned long __flags; \ + raw_local_irq_save(__flags); \ + __ret = *raw_cpu_ptr(&(pcp)); \ + raw_local_irq_restore(__flags); \ + __ret; \ +}) + +#define this_cpu_generic_read (pcp) \ +({ \ + typeof(pcp) __ret; \ + if (__native_word(pcp)) \ + __ret = __this_cpu_generic_read_nopreempt(pcp); \ + else \ + __ret = __this_cpu_generic_read_noirq(pcp); \ + __ret; \ +}) +#define this_cpu_generic_to_op (pcp, val, op) \ do { \ unsigned long __flags; \
include/linux/trace_events.h +1 -0
@@ -301,6 +301,7 @@ struct trace_event_call {int perf_refcount;struct hlist_head __percpu *perf_events;struct bpf_prog *prog; +struct perf_event *bpf_prog_owner;int (*perf_perm)(struct trace_event_call *,struct perf_event *);
include/net/sctp/ulpevent.h +5 -1
@@ -141,8 +141,12 @@ __u16 sctp_ulpevent_get_notification_type(const struct sctp_ulpevent *event);static inline int sctp_ulpevent_type_enabled (__u16 sn_type,struct sctp_event_subscribe *mask) { +int offset = sn_type -SCTP_SN_TYPE_BASE ;char *amask = (char *) mask; -return amask[sn_type -SCTP_SN_TYPE_BASE ]; + +if (offset >=sizeof (struct sctp_event_subscribe )) +return 0 ; +return amask[offset]; }/* Given an event subscription, is this event enabled? */
include/uapi/linux/mroute6.h +1 -0
@@ -3,6 +3,7 @@#include <linux/types.h> #include <linux/sockios.h> +#include <linux/in6.h> /* For struct sockaddr_in6. */ /* * Based on the MROUTING 3.5 defines primarily to keep
include/uapi/linux/rds.h +2 -1
@@ -35,6 +35,7 @@#define _LINUX_RDS_H#include <linux/types.h> +#include <linux/socket.h> /* For __kernel_sockaddr_storage. */ #define RDS_IB_ABI_VERSION 0x301
@@ -223,7 +224,7 @@ struct rds_get_mr_args { };struct rds_get_mr_for_dest_args { -struct sockaddr_storage dest_addr; +struct __kernel_sockaddr_storage dest_addr;struct rds_iovec vec;uint64_t cookie_addr;uint64_t flags;
kernel/bpf/verifier.c +2 -1
@@ -1033,7 +1033,8 @@ static int check_alu_op(struct verifier_env *env, struct bpf_insn *insn) } }else {if (insn->src_reg !=BPF_REG_0 || insn->off !=0 || - (insn->imm !=16 && insn->imm !=32 && insn->imm !=64 )) { + (insn->imm !=16 && insn->imm !=32 && insn->imm !=64 ) || +BPF_CLASS (insn->code) ==BPF_ALU64 ) {verbose ("BPF_END uses reserved fields\n" );return -EINVAL ; }
kernel/events/core.c +2 -1
@@ -7108,6 +7108,7 @@ static int perf_event_set_bpf_prog(struct perf_event *event, u32 prog_fd) } event->tp_event->prog = prog; + event->tp_event->bpf_prog_owner = event;return 0 ; }
@@ -7120,7 +7121,7 @@ static void perf_event_free_bpf_prog(struct perf_event *event)return ; prog = event->tp_event->prog; -if (prog) { +if (prog && event->tp_event->bpf_prog_owner == event) { event->tp_event->prog =NULL ;bpf_prog_put_rcu (prog); }
kernel/locking/lockdep.c +9 -2
@@ -3128,10 +3128,17 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass,if (depth) { hlock = curr->held_locks + depth -1 ;if (hlock->class_idx == class_idx && nest_lock) { -if (hlock->references) +if (hlock->references) { +/* +* Check: unsigned int references:12, overflow. +*/ +if (DEBUG_LOCKS_WARN_ON (hlock->references == (1 <<12 )-1 )) +return 0 ; + hlock->references++; -else + }else { hlock->references =2 ; + }return 1 ; }
mm/slab_common.c +4 -1
@@ -250,7 +250,7 @@ struct kmem_cache *find_mergeable(size_t size, size_t align, {struct kmem_cache *s; -if (slab_nomerge || (flags &SLAB_NEVER_MERGE )) +if (slab_nomerge)return NULL ;if (ctor)
@@ -261,6 +261,9 @@ struct kmem_cache *find_mergeable(size_t size, size_t align, size =ALIGN (size, align); flags =kmem_cache_flags (size, flags, name,NULL ); +if (flags &SLAB_NEVER_MERGE ) +return NULL ; +list_for_each_entry_reverse (s, &slab_caches, list) {if (slab_unmergeable (s))continue ;
net/core/sock.c +2 -0
@@ -1516,6 +1516,8 @@ struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority)sock_copy (newsk, sk); + newsk->sk_prot_creator = sk->sk_prot; +/* SANITY */ if (likely (newsk->sk_net_refcnt))get_net (sock_net (newsk));
net/ipv4/ip_vti.c +2 -1
@@ -156,6 +156,7 @@ static netdev_tx_t vti_xmit(struct sk_buff *skb, struct net_device *dev,struct ip_tunnel_parm *parms = &tunnel->parms;struct dst_entry *dst =skb_dst (skb);struct net_device *tdev;/* Device to other host */ +int pkt_len = skb->len;int err;if (!dst) {
@@ -199,7 +200,7 @@ static netdev_tx_t vti_xmit(struct sk_buff *skb, struct net_device *dev, err =dst_output (tunnel->net, skb->sk, skb);if (net_xmit_eval (err) ==0 ) - err = skb->len; + err = pkt_len;iptunnel_xmit_stats (err, &dev->stats, dev->tstats);return NETDEV_TX_OK ;
net/ipv6/ip6_gre.c +11 -10
@@ -1173,24 +1173,25 @@ static int ip6gre_tunnel_change_mtu(struct net_device *dev, int new_mtu) }static int ip6gre_header (struct sk_buff *skb,struct net_device *dev, -unsigned short type, -const void *daddr,const void *saddr,unsigned int len) +unsigned short type,const void *daddr, +const void *saddr,unsigned int len) {struct ip6_tnl *t =netdev_priv (dev); -struct ipv6hdr *ipv6h = (struct ipv6hdr *)skb_push (skb, t->hlen); -__be16 *p = (__be16 *)(ipv6h+1 ); +struct ipv6hdr *ipv6h; +__be16 *p; -ip6_flow_hdr (ipv6h,0 , -ip6_make_flowlabel (dev_net (dev), skb, - t->fl.u.ip6.flowlabel, true, - &t->fl.u.ip6)); + ipv6h = (struct ipv6hdr *)skb_push (skb, t->hlen +sizeof (*ipv6h)); +ip6_flow_hdr (ipv6h,0 ,ip6_make_flowlabel (dev_net (dev), skb, + t->fl.u.ip6.flowlabel, + true, &t->fl.u.ip6)); ipv6h->hop_limit = t->parms.hop_limit; ipv6h->nexthdr =NEXTHDR_GRE ; ipv6h->saddr = t->parms.laddr; ipv6h->daddr = t->parms.raddr; - p[0 ] = t->parms.o_flags; - p[1 ] =htons (type); + p = (__be16 *)(ipv6h +1 ); + p[0 ] = t->parms.o_flags; + p[1 ] =htons (type);/* * Set the source hardware address.
net/ipv6/ip6_vti.c +2 -1
@@ -434,6 +434,7 @@ vti6_xmit(struct sk_buff *skb, struct net_device *dev, struct flowi *fl)struct dst_entry *dst =skb_dst (skb);struct net_device *tdev;struct xfrm_state *x; +int pkt_len = skb->len;int err =-1 ;int mtu;
@@ -487,7 +488,7 @@ vti6_xmit(struct sk_buff *skb, struct net_device *dev, struct flowi *fl)struct pcpu_sw_netstats *tstats =this_cpu_ptr (dev->tstats);u64_stats_update_begin (&tstats->syncp); - tstats->tx_bytes += skb->len; + tstats->tx_bytes += pkt_len; tstats->tx_packets++;u64_stats_update_end (&tstats->syncp); }else {
net/ipv6/udp.c +1 -0
@@ -1007,6 +1007,7 @@ static void udp6_hwcsum_outgoing(struct sock *sk, struct sk_buff *skb,*/ offset =skb_transport_offset (skb); skb->csum =skb_checksum (skb, offset, skb->len - offset,0 ); + csum = skb->csum; skb->ip_summed =CHECKSUM_NONE ;
net/l2tp/l2tp_core.c +7 -7
@@ -1321,6 +1321,9 @@ static void l2tp_tunnel_del_work(struct work_struct *work)struct sock *sk =NULL ; tunnel = container_of(work, struct l2tp_tunnel, del_work); + +l2tp_tunnel_closeall (tunnel); + sk =l2tp_tunnel_sock_lookup (tunnel);if (!sk) goto out;
@@ -1640,15 +1643,12 @@ EXPORT_SYMBOL_GPL(l2tp_tunnel_create);/* This function is used by the netlink TUNNEL_DELETE command. */ -int l2tp_tunnel_delete (struct l2tp_tunnel *tunnel) +void l2tp_tunnel_delete (struct l2tp_tunnel *tunnel) { -l2tp_tunnel_inc_refcount (tunnel); -l2tp_tunnel_closeall (tunnel); -if (false ==queue_work (l2tp_wq, &tunnel->del_work)) { -l2tp_tunnel_dec_refcount (tunnel); -return 1 ; +if (!test_and_set_bit (0 , &tunnel->dead)) { +l2tp_tunnel_inc_refcount (tunnel); +queue_work (l2tp_wq, &tunnel->del_work); } -return 0 ; }EXPORT_SYMBOL_GPL (l2tp_tunnel_delete);
net/l2tp/l2tp_core.h +4 -1
@@ -169,6 +169,9 @@ struct l2tp_tunnel_cfg {struct l2tp_tunnel {int magic;/* Should be L2TP_TUNNEL_MAGIC */ + +unsigned long dead; +struct rcu_head rcu;rwlock_t hlist_lock;/* protect session_hlist */ struct hlist_head session_hlist[L2TP_HASH_SIZE ];
@@ -253,7 +256,7 @@ int l2tp_tunnel_create(struct net *net, int fd, int version, u32 tunnel_id, u32 peer_tunnel_id, struct l2tp_tunnel_cfg *cfg, struct l2tp_tunnel **tunnelp);void l2tp_tunnel_closeall (struct l2tp_tunnel *tunnel); -int l2tp_tunnel_delete (struct l2tp_tunnel *tunnel); +void l2tp_tunnel_delete (struct l2tp_tunnel *tunnel); struct l2tp_session *l2tp_session_create(int priv_size, struct l2tp_tunnel *tunnel, u32 session_id, u32 peer_session_id,
net/mac80211/sta_info.c +1 -1
@@ -661,7 +661,7 @@ static void __sta_info_recalc_tim(struct sta_info *sta, bool ignore_pending) }/* No need to do anything if the driver does all */ -if (ieee80211_hw_check (&local->hw,AP_LINK_PS )) +if (ieee80211_hw_check (&local->hw,AP_LINK_PS ) && !local->ops->set_tim)return ;if (sta->dead)
net/netfilter/nf_conntrack_expect.c +2 -2
@@ -395,7 +395,7 @@ static inline int __nf_ct_expect_check(struct nf_conntrack_expect *expect)struct net *net =nf_ct_exp_net (expect);struct hlist_node *next;unsigned int h; -int ret =1 ; +int ret =0 ;if (!master_help) { ret = -ESHUTDOWN ;
@@ -445,7 +445,7 @@ int nf_ct_expect_related_report(struct nf_conntrack_expect *expect,spin_lock_bh (&nf_conntrack_expect_lock); ret =__nf_ct_expect_check (expect); -if (ret <=0 ) +if (ret <0 ) goto out; ret =nf_ct_expect_insert (expect);
net/packet/af_packet.c +19 -9
@@ -1652,10 +1652,6 @@ static int fanout_add(struct sock *sk, u16 id, u16 type_flags)mutex_lock (&fanout_mutex); - err = -EINVAL ; -if (!po->running) - goto out; - err = -EALREADY ;if (po->fanout) goto out;
@@ -1704,7 +1700,10 @@ static int fanout_add(struct sock *sk, u16 id, u16 type_flags)list_add (&match->list, &fanout_list); } err = -EINVAL ; -if (match->type == type && + +spin_lock (&po->bind_lock); +if (po->running && + match->type == type && match->prot_hook.type == po->prot_hook.type && match->prot_hook.dev == po->prot_hook.dev) { err = -ENOSPC ;
@@ -1716,6 +1715,13 @@ static int fanout_add(struct sock *sk, u16 id, u16 type_flags) err =0 ; } } +spin_unlock (&po->bind_lock); + +if (err && !atomic_read (&match->sk_ref)) { +list_del (&match->list); +kfree (match); + } + out:if (err && rollover) {kfree (rollover);
@@ -2650,6 +2656,7 @@ static int packet_snd(struct socket *sock, struct msghdr *msg, size_t len)int vnet_hdr_len;struct packet_sock *po =pkt_sk (sk);unsigned short gso_type =0 ; +bool has_vnet_hdr = false;int hlen, tlen, linear;int extra_len =0 ;ssize_t n;
@@ -2737,6 +2744,7 @@ static int packet_snd(struct socket *sock, struct msghdr *msg, size_t len) goto out_unlock; } + has_vnet_hdr = true; }if (unlikely (sock_flag (sk,SOCK_NOFCS ))) {
@@ -2796,7 +2804,7 @@ static int packet_snd(struct socket *sock, struct msghdr *msg, size_t len)packet_pick_tx_queue (dev, skb); -if (po->has_vnet_hdr) { +if (has_vnet_hdr) {if (vnet_hdr.flags &VIRTIO_NET_HDR_F_NEEDS_CSUM ) {u16 s =__virtio16_to_cpu (vio_le (), vnet_hdr.csum_start);u16 o =__virtio16_to_cpu (vio_le (), vnet_hdr.csum_offset);
@@ -2938,13 +2946,15 @@ static int packet_do_bind(struct sock *sk, const char *name, int ifindex,int ret =0 ;bool unlisted = false; -if (po->fanout) -return -EINVAL ; -lock_sock (sk);spin_lock (&po->bind_lock);rcu_read_lock (); +if (po->fanout) { + ret = -EINVAL ; + goto out_unlock; + } +if (name) { dev =dev_get_by_name_rcu (sock_net (sk), name);if (!dev) {
net/tipc/msg.c +1 -1
@@ -541,7 +541,7 @@ bool tipc_msg_lookup_dest(struct net *net, struct sk_buff *skb, int *err)return false;if (msg_errcode (msg))return false; - *err = -TIPC_ERR_NO_NAME ; + *err =TIPC_ERR_NO_NAME ;if (skb_linearize (skb))return false; msg =buf_msg (skb);