Linux 3.18.60
Greg KH
maintainerI'm announcing the release of the 3.18.60 kernel.
All users of the 3.18 kernel series must upgrade.
The updated 3.18.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.18.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
------------
Documentation/sysctl/kernel.txt | 15 ++++----- Makefile | 2 - arch/arm/boot/dts/bcm5301x.dtsi | 4 +- arch/arm/mm/mmu.c | 8 ++-- arch/arm64/kernel/setup.c | 3 + arch/mips/kernel/entry.S | 3 + arch/mips/kernel/pm-cps.c | 9 ----- arch/mips/kernel/traps.c | 2 + arch/x86/kvm/vmx.c | 2 - arch/x86/kvm/x86.c | 2 + drivers/cpufreq/s3c2416-cpufreq.c | 1 drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c | 1 drivers/iommu/amd_iommu_v2.c | 2 - drivers/iommu/intel-iommu.c | 2 - drivers/mtd/bcm47xxpart.c | 4 +- drivers/net/ethernet/korina.c | 8 ++-- drivers/usb/gadget/function/f_fs.c | 8 +++- drivers/usb/host/xhci-ring.c | 11 ------ drivers/usb/host/xhci.c | 13 -------- drivers/watchdog/bcm_kona_wdt.c | 3 + include/net/xfrm.h | 10 ------ kernel/sysctl.c | 2 - mm/huge_memory.c | 7 ++++ net/8021q/vlan.c | 3 + net/caif/cfpkt_skbuff.c | 6 --- net/core/dev.c | 3 + net/core/dst.c | 14 ++++++++ net/decnet/dn_route.c | 14 ++------ net/decnet/netfilter/dn_rtmsg.c | 4 +- net/ipv4/igmp.c | 22 ++++++++----- net/ipv6/addrconf.c | 6 +-- net/ipv6/ip6_output.c | 6 ++- net/key/af_key.c | 17 ++++++++-- net/netfilter/nf_conntrack_netlink.c | 4 ++ net/netfilter/xt_TCPMSS.c | 6 +++ net/xfrm/xfrm_policy.c | 47 ----------------------------- sound/pci/hda/hda_generic.c | 1 37 files changed, 120 insertions(+), 155 deletions(-)
Alexander Potapenko (1):
net: don't call strlen on non-terminated string in dev_set_alias()
Baolin Wang (1):
usb: gadget: f_fs: Fix possibe deadlock
Dan Carpenter (3):
xfrm: NULL dereference on allocation failure
xfrm: Oops on error in pfkey_msg2xfrm_state()
cpufreq: s3c2416: double free on driver init error path
David Dillow (1):
iommu/vt-d: Don't over-free page table directories
Deepak Rawat (1):
drm/vmwgfx: Free hash table allocated by cmdbuf managed res mgr
Doug Berger (1):
ARM: 8685/1: ensure memblock-limit is pmd-aligned
Eric Anholt (1):
watchdog: bcm281xx: Fix use of uninitialized spinlock.
Eric Dumazet (1):
netfilter: xt_TCPMSS: add more sanity tests on tcph->doff
Eric Leblond (1):
netfilter: synproxy: fix conntrackd interaction
Florian Fainelli (1):
net: korina: Fix NAPI versus resources freeing
Gao Feng (1):
net: 8021q: Fix one possible panic caused by BUG_ON in free_netdev
Greg Kroah-Hartman (1):
Linux 3.18.60
Hui Wang (1):
ALSA: hda - set input_path bitmap to zero after moving it to new place
James Hogan (1):
MIPS: Avoid accidental raw backtrace
Jia-Ju Bai (1):
net: caif: Fix a sleep-in-atomic bug in cfpkt_create_pfx
Jon Mason (1):
ARM: dts: BCM5301X: Correct GIC_PPI interrupt flags
Julien Grall (1):
arm64: cpuinfo: Missing NULL terminator in compat_hwcap_str
Kees Cook (1):
sysctl: enable strict writes
Krister Johansen (1):
Fix an intermittent pr_emerg warning about lo becoming free.
Mark Rutland (1):
mm: numa: avoid waiting on freed migrated pages
Mateusz Jurczyk (1):
decnet: dn_rtmsg: Improve input length sanitization in dnrmg_receive_user_skb
Mathias Nyman (1):
xhci: fix deadlock at host remove by running watchdog correctly
Pan Bian (1):
iommu/amd: Fix incorrect error handling in amd_iommu_bind_pasid()
Paul Burton (2):
MIPS: pm-cps: Drop manual cache-line alignment of ready_count
MIPS: Fix IRQ tracing & lockdep when rescheduling
Radim Krčmář (1):
KVM: x86: zero base3 of unusable segments
Rafał Miłecki (1):
mtd: bcm47xxpart: limit scanned flash area on BCM47XX (MIPS) only
Sabrina Dubroca (1):
xfrm: fix stack access out of bounds with CONFIG_XFRM_SUB_POLICY
WANG Cong (2):
igmp: acquire pmc lock for ip_mc_clear_src()
igmp: add a missing spin_lock_init()
Wanpeng Li (1):
KVM: nVMX: Fix exception injection
Wei Wang (1):
decnet: always not take dst->__refcnt when inserting dst into hash table
Willem de Bruijn (1):
ipv6: release dst on error in ip6_dst_lookup_tail
Xin Long (1):
ipv6: fix calling in6_ifa_hold incorrectly for dad work
Greg KH
maintainerDocumentation/sysctl/kernel.txt +7 -8
@@ -775,14 +775,13 @@ via the /proc/sys interface: Each write syscall must fully contain the sysctl value to be written, and multiple writes on the same sysctl file descriptor will rewrite the sysctl value, regardless of file position. - 0 - (default) Same behavior as above, but warn about processes that - perform writes to a sysctl file descriptor when the file position - is not 0. - 1 - Respect file position when writing sysctl strings. Multiple writes - will append to the sysctl value buffer. Anything past the max length - of the sysctl value buffer will be ignored. Writes to numeric sysctl - entries must always be at file position 0 and the value must be - fully contained in the buffer sent in the write syscall. + 0 - Same behavior as above, but warn about processes that perform writes + to a sysctl file descriptor when the file position is not 0. + 1 - (default) Respect file position when writing sysctl strings. Multiple + writes will append to the sysctl value buffer. Anything past the max + length of the sysctl value buffer will be ignored. Writes to numeric + sysctl entries must always be at file position 0 and the value must + be fully contained in the buffer sent in the write syscall. ==============================================================
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 18 -SUBLEVEL = 59 +SUBLEVEL = 60 EXTRAVERSION = NAME = Diseased Newt
arch/arm/boot/dts/bcm5301x.dtsi +2 -2
@@ -52,14 +52,14 @@ timer@0200 { compatible = "arm,cortex-a9-global-timer"; reg = <0x0200 0x100>; - interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>; + interrupts = <GIC_PPI 11 IRQ_TYPE_EDGE_RISING>; clocks = <&clk_periph>; }; local-timer@0600 { compatible = "arm,cortex-a9-twd-timer"; reg = <0x0600 0x100>; - interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>; + interrupts = <GIC_PPI 13 IRQ_TYPE_EDGE_RISING>; clocks = <&clk_periph>; };
arch/arm/mm/mmu.c +4 -4
@@ -1142,15 +1142,15 @@ void __init sanity_check_meminfo(void) high_memory =__va (arm_lowmem_limit -1 ) +1 ; +if (!memblock_limit) + memblock_limit = arm_lowmem_limit; +/* * Round the memblock limit down to a pmd size. This * helps to ensure that we will allocate memory from the * last full pmd, which should be mapped. */ -if (memblock_limit) - memblock_limit =round_down (memblock_limit,PMD_SIZE ); -if (!memblock_limit) - memblock_limit = arm_lowmem_limit; + memblock_limit =round_down (memblock_limit,PMD_SIZE );memblock_set_current_limit (memblock_limit); }
arch/arm64/kernel/setup.c +2 -1
@@ -473,7 +473,8 @@ static const char *compat_hwcap_str[] = {"idivt" ,"vfpd32" ,"lpae" , -"evtstrm" +"evtstrm" , +NULL }; static const char *compat_hwcap2_str[] = {
arch/mips/kernel/entry.S +3 -0
@@ -11,6 +11,7 @@ #include <asm/asm.h> #include <asm/asmmacro.h> #include <asm/compiler.h> +#include <asm/irqflags.h> #include <asm/regdef.h> #include <asm/mipsregs.h> #include <asm/stackframe.h>
@@ -119,6 +120,7 @@ work_pending: andi t0, a2, _TIF_NEED_RESCHED # a2 is preloaded with TI_FLAGS beqz t0, work_notifysig work_resched: + TRACE_IRQS_OFF jal schedule local_irq_disable # make sure need_resched and
@@ -155,6 +157,7 @@ syscall_exit_work: beqz t0, work_pending # trace bit set? local_irq_enable # could let syscall_trace_leave() # call schedule() instead + TRACE_IRQS_ON move a0, sp jal syscall_trace_leave b resume_userspace
arch/mips/kernel/pm-cps.c +1 -8
@@ -55,7 +55,6 @@ DECLARE_BITMAP(state_support, CPS_PM_STATE_COUNT);* state. Actually per-core rather than per-CPU. */ static DEFINE_PER_CPU_ALIGNED(u32*, ready_count); -static DEFINE_PER_CPU_ALIGNED(void*, ready_count_alloc);/* Indicates online CPUs coupled with the current CPU */ static DEFINE_PER_CPU_ALIGNED(cpumask_t, online_coupled);
@@ -624,7 +623,6 @@ static int __init cps_gen_core_entries(unsigned cpu) {enum cps_pm_state state;unsigned core = cpu_data[cpu].core; -unsigned dlinesz = cpu_data[cpu].dcache.linesz;void *entry_fn, *core_rc;for (state =CPS_PM_NC_WAIT ; state <CPS_PM_STATE_COUNT ; state++) {
@@ -644,16 +642,11 @@ static int __init cps_gen_core_entries(unsigned cpu) }if (!per_cpu (ready_count, core)) { - core_rc =kmalloc (dlinesz *2 ,GFP_KERNEL ); + core_rc =kmalloc (sizeof (u32),GFP_KERNEL );if (!core_rc) {pr_err ("Failed allocate core %u ready_count\n" , core);return -ENOMEM ; } -per_cpu (ready_count_alloc, core) = core_rc; - -/* Ensure ready_count is aligned to a cacheline boundary */ - core_rc += dlinesz -1 ; - core_rc = (void *)((unsigned long )core_rc & ~(dlinesz -1 ));per_cpu (ready_count, core) = core_rc; }
arch/mips/kernel/traps.c +2 -0
@@ -191,6 +191,8 @@ void show_stack(struct task_struct *task, unsigned long *sp) {struct pt_regs regs;mm_segment_t old_fs =get_fs (); + + regs.cp0_status =KSU_KERNEL ;if (sp) { regs.regs[29 ] = (unsigned long )sp; regs.regs[31 ] =0 ;
arch/x86/kvm/vmx.c +1 -1
@@ -2026,7 +2026,7 @@ static int nested_vmx_check_exception(struct kvm_vcpu *vcpu, unsigned nr)if (!(vmcs12->exception_bitmap & (1u << nr)))return 0 ; -nested_vmx_vmexit (vcpu,to_vmx (vcpu)->exit_reason, +nested_vmx_vmexit (vcpu,EXIT_REASON_EXCEPTION_NMI ,vmcs_read32 (VM_EXIT_INTR_INFO ),vmcs_readl (EXIT_QUALIFICATION ));return 1 ;
arch/x86/kvm/x86.c +2 -0
@@ -4853,6 +4853,8 @@ static bool emulator_get_segment(struct x86_emulate_ctxt *ctxt, u16 *selector,if (var.unusable) {memset (desc,0 ,sizeof (*desc)); +if (base3) + *base3 =0 ;return false; }
drivers/cpufreq/s3c2416-cpufreq.c +0 -1
@@ -400,7 +400,6 @@ static int s3c2416_cpufreq_driver_init(struct cpufreq_policy *policy) rate =clk_get_rate (s3c_freq->hclk);if (rate <133 *1000 *1000 ) {pr_err ("cpufreq: HCLK not at 133MHz\n" ); -clk_put (s3c_freq->hclk); ret = -EINVAL ; goto err_armclk; }
drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c +1 -0
@@ -317,6 +317,7 @@ void vmw_cmdbuf_res_man_destroy(struct vmw_cmdbuf_res_manager *man)list_for_each_entry_safe (entry, next, &man->list, head)vmw_cmdbuf_res_free (man, entry); +drm_ht_remove (&man->resources);kfree (man); }
drivers/iommu/amd_iommu_v2.c +1 -1
@@ -701,9 +701,9 @@ out_clear_state: out_unregister:mmu_notifier_unregister (&pasid_state->mn, mm); +mmput (mm); out_free: -mmput (mm);free_pasid_state (pasid_state); out:
drivers/iommu/intel-iommu.c +1 -1
@@ -980,7 +980,7 @@ static void dma_pte_free_level(struct dmar_domain *domain, int level,if (!dma_pte_present (pte) ||dma_pte_superpage (pte)) goto next; - level_pfn = pfn &level_mask (level -1 ); + level_pfn = pfn &level_mask (level); level_pte =phys_to_virt (dma_pte_addr (pte));if (level >2 )
drivers/mtd/bcm47xxpart.c +2 -2
@@ -87,8 +87,8 @@ static int bcm47xxpart_parse(struct mtd_info *master,/* Parse block by block looking for magics */ for (offset =0 ; offset <= master->size - blocksize; offset += blocksize) { -/* Nothing more in higher memory */ -if (offset >=0x2000000 ) +/* Nothing more in higher memory on BCM47XX (MIPS) */ +if (config_enabled (CONFIG_BCM47XX ) && offset >=0x2000000 )break ;if (curr_part >=BCM47XXPART_MAX_PARTS ) {
drivers/net/ethernet/korina.c +4 -4
@@ -900,10 +900,10 @@ static void korina_restart_task(struct work_struct *work)DMA_STAT_DONE |DMA_STAT_HALT |DMA_STAT_ERR , &lp->rx_dma_regs->dmasm); -korina_free_ring (dev); -napi_disable (&lp->napi); +korina_free_ring (dev); +if (korina_init (dev) <0 ) {printk (KERN_ERR "%s: cannot restart device\n" , dev->name);return ;
@@ -1064,12 +1064,12 @@ static int korina_close(struct net_device *dev) tmp = tmp |DMA_STAT_DONE |DMA_STAT_HALT |DMA_STAT_ERR ;writel (tmp, &lp->rx_dma_regs->dmasm); -korina_free_ring (dev); -napi_disable (&lp->napi);cancel_work_sync (&lp->restart_task); +korina_free_ring (dev); +free_irq (lp->rx_irq, dev);free_irq (lp->tx_irq, dev);free_irq (lp->ovr_irq, dev);
drivers/usb/gadget/function/f_fs.c +6 -2
@@ -3412,6 +3412,7 @@ static void ffs_closed(struct ffs_data *ffs) {struct ffs_dev *ffs_obj;struct f_fs_opts *opts; +struct config_item *ci;ENTER ();ffs_dev_lock ();
@@ -3434,8 +3435,11 @@ static void ffs_closed(struct ffs_data *ffs) || !atomic_read(&opts->func_inst.group.cg_item.ci_kref.refcount)) goto done; -unregister_gadget_item (ffs_obj->opts-> - func_inst.group.cg_item.ci_parent->ci_parent); + ci = opts->func_inst.group.cg_item.ci_parent->ci_parent; +ffs_dev_unlock (); + +unregister_gadget_item (ci); +return ; done:ffs_dev_unlock (); }
drivers/usb/host/xhci-ring.c +0 -11
@@ -839,17 +839,6 @@ void xhci_stop_endpoint_command_watchdog(unsigned long arg)spin_lock_irqsave (&xhci->lock, flags); ep->stop_cmds_pending--; -if (xhci->xhc_state &XHCI_STATE_REMOVING ) { -spin_unlock_irqrestore (&xhci->lock, flags); -return ; - } -if (xhci->xhc_state &XHCI_STATE_DYING ) { -xhci_dbg_trace (xhci, trace_xhci_dbg_cancel_urb, -"Stop EP timer ran, but another timer marked " -"xHCI as DYING, exiting." ); -spin_unlock_irqrestore (&xhci->lock, flags); -return ; - }if (!(ep->stop_cmds_pending ==0 && (ep->ep_state &EP_HALT_PENDING ))) {xhci_dbg_trace (xhci, trace_xhci_dbg_cancel_urb, "Stop EP timer ran, but no command pending, "
drivers/usb/host/xhci.c +0 -13
@@ -1565,19 +1565,6 @@ int xhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)xhci_urb_free_priv (xhci, urb_priv);return ret; } -if ((xhci->xhc_state &XHCI_STATE_DYING ) || - (xhci->xhc_state &XHCI_STATE_HALTED )) { -xhci_dbg_trace (xhci, trace_xhci_dbg_cancel_urb, -"Ep 0x%x: URB %p to be canceled on " -"non-responsive xHCI host." , - urb->ep->desc.bEndpointAddress, urb); -/* Let the stop endpoint command watchdog timer (which set this -* state) finish cleaning up the endpoint TD lists. We must -* have caught it in the middle of dropping a lock and giving -* back an URB. -*/ - goto done; - } ep_index =xhci_get_endpoint_index (&urb->ep->desc); ep = &xhci->devs[urb->dev->slot_id]->eps[ep_index];
drivers/watchdog/bcm_kona_wdt.c +2 -1
@@ -299,6 +299,8 @@ static int bcm_kona_wdt_probe(struct platform_device *pdev)if (!wdt)return -ENOMEM ; +spin_lock_init (&wdt->lock); + res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); wdt->base =devm_ioremap_resource (dev, res);if (IS_ERR (wdt->base))
@@ -311,7 +313,6 @@ static int bcm_kona_wdt_probe(struct platform_device *pdev)return ret; } -spin_lock_init (&wdt->lock);platform_set_drvdata (pdev, wdt);watchdog_set_drvdata (&bcm_kona_wdt_wdd, wdt);
include/net/xfrm.h +0 -10
@@ -949,10 +949,6 @@ struct xfrm_dst {struct flow_cache_object flo;struct xfrm_policy *pols[XFRM_POLICY_TYPE_MAX ];int num_pols, num_xfrms; -#ifdef CONFIG_XFRM_SUB_POLICY -struct flowi *origin; -struct xfrm_selector *partner; -#endif u32 xfrm_genid;u32 policy_genid;u32 route_mtu_cached;
@@ -968,12 +964,6 @@ static inline void xfrm_dst_destroy(struct xfrm_dst *xdst)dst_release (xdst->route);if (likely (xdst->u.dst.xfrm)) xfrm_state_put(xdst->u.dst.xfrm); -#ifdef CONFIG_XFRM_SUB_POLICY -kfree (xdst->origin); - xdst->origin =NULL ; -kfree (xdst->partner); - xdst->partner =NULL ; -#endif }#endif
kernel/sysctl.c +1 -1
@@ -173,7 +173,7 @@ extern int no_unaligned_warning;#define SYSCTL_WRITES_WARN 0#define SYSCTL_WRITES_STRICT 1 -static int sysctl_writes_strict =SYSCTL_WRITES_WARN ; +static int sysctl_writes_strict =SYSCTL_WRITES_STRICT ;static int proc_do_cad_pid (struct ctl_table *table,int write,void __user *buffer,size_t *lenp,loff_t *ppos);
mm/huge_memory.c +7 -0
@@ -1294,8 +1294,12 @@ int do_huge_pmd_numa_page(struct mm_struct *mm, struct vm_area_struct *vma,* check_same as the page may no longer be mapped. */ if (unlikely (pmd_trans_migrating (*pmdp))) { + page =pmd_page (*pmdp); +if (!get_page_unless_zero (page)) + goto out_unlock;spin_unlock (ptl);wait_migrate_huge_page (vma->anon_vma, pmdp); +put_page (page); goto out; }
@@ -1331,8 +1335,11 @@ int do_huge_pmd_numa_page(struct mm_struct *mm, struct vm_area_struct *vma,/* Migration could have started since the pmd_trans_migrating check */ if (!page_locked) { +if (!get_page_unless_zero (page)) + goto out_unlock;spin_unlock (ptl);wait_on_page_locked (page); +put_page (page); page_nid =-1 ; goto out; }
net/8021q/vlan.c +2 -1
@@ -278,7 +278,8 @@ static int register_vlan_device(struct net_device *real_dev, u16 vlan_id)return 0 ; out_free_newdev: -free_netdev (new_dev); +if (new_dev->reg_state ==NETREG_UNINITIALIZED ) +free_netdev (new_dev);return err; }
net/caif/cfpkt_skbuff.c +1 -5
@@ -81,11 +81,7 @@ static struct cfpkt *cfpkt_create_pfx(u16 len, u16 pfx) {struct sk_buff *skb; -if (likely (in_interrupt ())) - skb =alloc_skb (len + pfx,GFP_ATOMIC ); -else - skb =alloc_skb (len + pfx,GFP_KERNEL ); - + skb =alloc_skb (len + pfx,GFP_ATOMIC );if (unlikely (skb ==NULL ))return NULL ;
net/core/dev.c +2 -1
@@ -1194,8 +1194,9 @@ int dev_set_alias(struct net_device *dev, const char *alias, size_t len)if (!new_ifalias)return -ENOMEM ; dev->ifalias = new_ifalias; +memcpy (dev->ifalias, alias, len); + dev->ifalias[len] =0 ; -strlcpy (dev->ifalias, alias, len+1 );return len; }
net/core/dst.c +14 -0
@@ -397,6 +397,20 @@ static int dst_dev_event(struct notifier_block *this, unsigned long event,spin_lock_bh (&dst_garbage.lock); dst = dst_garbage.list; dst_garbage.list =NULL ; +/* The code in dst_ifdown places a hold on the loopback device. +* If the gc entry processing is set to expire after a lengthy +* interval, this hold can cause netdev_wait_allrefs() to hang +* out and wait for a long time -- until the the loopback +* interface is released. If we're really unlucky, it'll emit +* pr_emerg messages to console too. Reset the interval here, +* so dst cleanups occur in a more timely fashion. +*/ +if (dst_garbage.timer_inc >DST_GC_INC ) { + dst_garbage.timer_inc =DST_GC_INC ; + dst_garbage.timer_expires =DST_GC_MIN ; +mod_delayed_work (system_wq, &dst_gc_work, + dst_garbage.timer_expires); + }spin_unlock_bh (&dst_garbage.lock);if (last)
net/decnet/dn_route.c +4 -10
@@ -189,12 +189,6 @@ static inline void dnrt_free(struct dn_route *rt)call_rcu_bh (&rt->dst.rcu_head, dst_rcu_free); } -static inline void dnrt_drop (struct dn_route *rt) -{ -dst_release (&rt->dst); -call_rcu_bh (&rt->dst.rcu_head, dst_rcu_free); -} -static void dn_dst_check_expire (unsigned long dummy) {int i;
@@ -249,7 +243,7 @@ static int dn_dst_gc(struct dst_ops *ops) } *rtp = rt->dst.dn_next; rt->dst.dn_next =NULL ; -dnrt_drop (rt); +dnrt_free (rt);break ; }spin_unlock_bh (&dn_rt_hash_table[i].lock);
@@ -351,7 +345,7 @@ static int dn_insert_route(struct dn_route *rt, unsigned int hash, struct dn_roudst_use (&rth->dst, now);spin_unlock_bh (&dn_rt_hash_table[hash].lock); -dnrt_drop (rt); +dst_free (&rt->dst); *rp = rth;return 0 ; }
@@ -381,7 +375,7 @@ static void dn_run_flush(unsigned long dummy)for (; rt; rt = next) { next =rcu_dereference_raw (rt->dst.dn_next);RCU_INIT_POINTER (rt->dst.dn_next,NULL ); -dst_free ((struct dst_entry *)rt); +dnrt_free (rt); } nothing_to_declare:
@@ -1195,7 +1189,7 @@ make_route:if (dev_out->flags &IFF_LOOPBACK ) flags |=RTCF_LOCAL ; - rt =dst_alloc (&dn_dst_ops, dev_out,1 ,DST_OBSOLETE_NONE ,DST_HOST ); + rt =dst_alloc (&dn_dst_ops, dev_out,0 ,DST_OBSOLETE_NONE ,DST_HOST );if (rt ==NULL ) goto e_nobufs;
net/decnet/netfilter/dn_rtmsg.c +3 -1
@@ -104,7 +104,9 @@ static inline void dnrmg_receive_user_skb(struct sk_buff *skb) {struct nlmsghdr *nlh =nlmsg_hdr (skb); -if (nlh->nlmsg_len <sizeof (*nlh) || skb->len < nlh->nlmsg_len) +if (skb->len <sizeof (*nlh) || + nlh->nlmsg_len <sizeof (*nlh) || + skb->len < nlh->nlmsg_len)return ;if (!netlink_capable (skb,CAP_NET_ADMIN ))
net/ipv4/igmp.c +14 -8
@@ -1080,6 +1080,7 @@ static void igmpv3_add_delrec(struct in_device *in_dev, struct ip_mc_list *im) pmc =kzalloc (sizeof (*pmc),GFP_KERNEL );if (!pmc)return ; +spin_lock_init (&pmc->lock);spin_lock_bh (&im->lock); pmc->interface = im->interface;in_dev_hold (in_dev);
@@ -1832,21 +1833,26 @@ static int ip_mc_add_src(struct in_device *in_dev, __be32 *pmca, int sfmode,static void ip_mc_clear_src (struct ip_mc_list *pmc) { -struct ip_sf_list *psf, *nextpsf; +struct ip_sf_list *psf, *nextpsf, *tomb, *sources; -for (psf = pmc->tomb; psf; psf = nextpsf) { +spin_lock_bh (&pmc->lock); + tomb = pmc->tomb; + pmc->tomb =NULL ; + sources = pmc->sources; + pmc->sources =NULL ; + pmc->sfmode =MCAST_EXCLUDE ; + pmc->sfcount[MCAST_INCLUDE ] =0 ; + pmc->sfcount[MCAST_EXCLUDE ] =1 ; +spin_unlock_bh (&pmc->lock); + +for (psf = tomb; psf; psf = nextpsf) { nextpsf = psf->sf_next;kfree (psf); } - pmc->tomb =NULL ; -for (psf = pmc->sources; psf; psf = nextpsf) { +for (psf = sources; psf; psf = nextpsf) { nextpsf = psf->sf_next;kfree (psf); } - pmc->sources =NULL ; - pmc->sfmode =MCAST_EXCLUDE ; - pmc->sfcount[MCAST_INCLUDE ] =0 ; - pmc->sfcount[MCAST_EXCLUDE ] =1 ; }
net/ipv6/addrconf.c +3 -3
@@ -269,9 +269,9 @@ static void addrconf_mod_rs_timer(struct inet6_dev *idev,static void addrconf_mod_dad_work (struct inet6_ifaddr *ifp,unsigned long delay) { -if (!delayed_work_pending (&ifp->dad_work)) -in6_ifa_hold (ifp); -mod_delayed_work (addrconf_wq, &ifp->dad_work, delay); +in6_ifa_hold (ifp); +if (mod_delayed_work (addrconf_wq, &ifp->dad_work, delay)) +in6_ifa_put (ifp); }static int snmp6_alloc_dev (struct inet6_dev *idev)
net/ipv6/ip6_output.c +4 -2
@@ -961,8 +961,10 @@ static int ip6_dst_lookup_tail(struct sock *sk, }#endif if (ipv6_addr_v4mapped (&fl6->saddr) && - !(ipv6_addr_v4mapped (&fl6->daddr) ||ipv6_addr_any (&fl6->daddr))) -return -EAFNOSUPPORT ; + !(ipv6_addr_v4mapped (&fl6->daddr) ||ipv6_addr_any (&fl6->daddr))) { + err = -EAFNOSUPPORT ; + goto out_err_release; + }return 0 ;
net/key/af_key.c +13 -4
@@ -1135,6 +1135,7 @@ static struct xfrm_state * pfkey_msg2xfrm_state(struct net *net, goto out; } + err = -ENOBUFS ; key = ext_hdrs[SADB_EXT_KEY_AUTH -1 ];if (sa->sadb_sa_auth) {int keysize =0 ;
@@ -1146,8 +1147,10 @@ static struct xfrm_state * pfkey_msg2xfrm_state(struct net *net,if (key) keysize = (key->sadb_key_bits +7 ) /8 ; x->aalg =kmalloc (sizeof (*x->aalg) + keysize,GFP_KERNEL ); -if (!x->aalg) +if (!x->aalg) { + err = -ENOMEM ; goto out; + }strcpy (x->aalg->alg_name, a->name); x->aalg->alg_key_len =0 ;if (key) {
@@ -1166,8 +1169,10 @@ static struct xfrm_state * pfkey_msg2xfrm_state(struct net *net, goto out; } x->calg =kmalloc (sizeof (*x->calg),GFP_KERNEL ); -if (!x->calg) +if (!x->calg) { + err = -ENOMEM ; goto out; + }strcpy (x->calg->alg_name, a->name); x->props.calgo = sa->sadb_sa_encrypt; }else {
@@ -1181,8 +1186,10 @@ static struct xfrm_state * pfkey_msg2xfrm_state(struct net *net,if (key) keysize = (key->sadb_key_bits +7 ) /8 ; x->ealg =kmalloc (sizeof (*x->ealg) + keysize,GFP_KERNEL ); -if (!x->ealg) +if (!x->ealg) { + err = -ENOMEM ; goto out; + }strcpy (x->ealg->alg_name, a->name); x->ealg->alg_key_len =0 ;if (key) {
@@ -1226,8 +1233,10 @@ static struct xfrm_state * pfkey_msg2xfrm_state(struct net *net,struct xfrm_encap_tmpl *natt; x->encap =kmalloc (sizeof (*x->encap),GFP_KERNEL ); -if (!x->encap) +if (!x->encap) { + err = -ENOMEM ; goto out; + } natt = x->encap; n_type = ext_hdrs[SADB_X_EXT_NAT_T_TYPE -1 ];
net/netfilter/nf_conntrack_netlink.c +4 -0
@@ -45,6 +45,8 @@#include <net/netfilter/nf_conntrack_zones.h> #include <net/netfilter/nf_conntrack_timestamp.h> #include <net/netfilter/nf_conntrack_labels.h> +#include <net/netfilter/nf_conntrack_seqadj.h> +#include <net/netfilter/nf_conntrack_synproxy.h> #ifdef CONFIG_NF_NAT_NEEDED #include <net/netfilter/nf_nat_core.h> #include <net/netfilter/nf_nat_l4proto.h>
@@ -1688,6 +1690,8 @@ ctnetlink_create_conntrack(struct net *net, u16 zone,nf_ct_tstamp_ext_add (ct,GFP_ATOMIC );nf_ct_ecache_ext_add (ct,0 ,0 ,GFP_ATOMIC );nf_ct_labels_ext_add (ct); +nfct_seqadj_ext_add (ct); +nfct_synproxy_ext_add (ct);/* we must add conntrack extensions before confirmation. */ ct->status |=IPS_CONFIRMED ;
net/netfilter/xt_TCPMSS.c +5 -1
@@ -104,7 +104,7 @@ tcpmss_mangle_packet(struct sk_buff *skb, tcph = (struct tcphdr *)(skb_network_header (skb) + tcphoff); tcp_hdrlen = tcph->doff *4 ; -if (len < tcp_hdrlen) +if (len < tcp_hdrlen || tcp_hdrlen <sizeof (struct tcphdr ))return -1 ;if (info->mss ==XT_TCPMSS_CLAMP_PMTU ) {
@@ -156,6 +156,10 @@ tcpmss_mangle_packet(struct sk_buff *skb,if (len > tcp_hdrlen)return 0 ; +/* tcph->doff has 4 bits, do not wrap it to 0 */ +if (tcp_hdrlen >=15 *4 ) +return 0 ; +/* * MSS Option not found ?! add it.. */
net/xfrm/xfrm_policy.c +0 -47
59 lines not on this page · raw message
sound/pci/hda/hda_generic.c +1 -0
@@ -3079,6 +3079,7 @@ static int check_dyn_adc_switch(struct hda_codec *codec) spec->input_paths[i][nums]); spec->input_paths[i][nums] = spec->input_paths[i][n]; + spec->input_paths[i][n] =0 ; } } nums++;