Skip to content

Commit

Permalink
Linux 3.0.96
Browse files Browse the repository at this point in the history
  • Loading branch information
mrg666 committed Sep 12, 2013
1 parent 3e083d5 commit 7e4d6dd
Show file tree
Hide file tree
Showing 20 changed files with 106 additions and 44 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION = 3
PATCHLEVEL = 0
SUBLEVEL = 95
SUBLEVEL = 96
EXTRAVERSION =
NAME = Sneaky Weasel

Expand Down
6 changes: 3 additions & 3 deletions arch/m32r/boot/compressed/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ endif

OBJCOPYFLAGS += -R .empty_zero_page

suffix_$(CONFIG_KERNEL_GZIP) = gz
suffix_$(CONFIG_KERNEL_BZIP2) = bz2
suffix_$(CONFIG_KERNEL_LZMA) = lzma
suffix-$(CONFIG_KERNEL_GZIP) = gz
suffix-$(CONFIG_KERNEL_BZIP2) = bz2
suffix-$(CONFIG_KERNEL_LZMA) = lzma

$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) FORCE
$(call if_changed,ld)
12 changes: 11 additions & 1 deletion arch/m32r/boot/compressed/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ static unsigned long free_mem_ptr;
static unsigned long free_mem_end_ptr;

#ifdef CONFIG_KERNEL_BZIP2
static void *memset(void *s, int c, size_t n)
void *memset(void *s, int c, size_t n)
{
char *ss = s;

Expand All @@ -39,6 +39,16 @@ static void *memset(void *s, int c, size_t n)
#endif

#ifdef CONFIG_KERNEL_GZIP
void *memcpy(void *dest, const void *src, size_t n)
{
char *d = dest;
const char *s = src;
while (n--)
*d++ = *s++;

return dest;
}

#define BOOT_HEAP_SIZE 0x10000
#include "../../../../lib/decompress_inflate.c"
#endif
Expand Down
17 changes: 11 additions & 6 deletions arch/s390/kvm/kvm-s390.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,8 @@ int kvm_arch_vcpu_ioctl_set_mpstate(struct kvm_vcpu *vcpu,

static void __vcpu_run(struct kvm_vcpu *vcpu)
{
int rc;

memcpy(&vcpu->arch.sie_block->gg14, &vcpu->arch.guest_gprs[14], 16);

if (need_resched())
Expand All @@ -455,21 +457,24 @@ static void __vcpu_run(struct kvm_vcpu *vcpu)

kvm_s390_deliver_pending_interrupts(vcpu);

VCPU_EVENT(vcpu, 6, "entering sie flags %x",
atomic_read(&vcpu->arch.sie_block->cpuflags));

vcpu->arch.sie_block->icptcode = 0;
local_irq_disable();
kvm_guest_enter();
local_irq_enable();
VCPU_EVENT(vcpu, 6, "entering sie flags %x",
atomic_read(&vcpu->arch.sie_block->cpuflags));
if (sie64a(vcpu->arch.sie_block, vcpu->arch.guest_gprs)) {
rc = sie64a(vcpu->arch.sie_block, vcpu->arch.guest_gprs);
local_irq_disable();
kvm_guest_exit();
local_irq_enable();

if (rc) {
VCPU_EVENT(vcpu, 3, "%s", "fault in sie instruction");
kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING);
}
VCPU_EVENT(vcpu, 6, "exit sie icptcode %d",
vcpu->arch.sie_block->icptcode);
local_irq_disable();
kvm_guest_exit();
local_irq_enable();

memcpy(&vcpu->arch.guest_gprs[14], &vcpu->arch.sie_block->gg14, 16);
}
Expand Down
6 changes: 4 additions & 2 deletions drivers/net/tun.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,17 +614,19 @@ static __inline__ ssize_t tun_get_user(struct tun_struct *tun,
int offset = 0;

if (!(tun->flags & TUN_NO_PI)) {
if ((len -= sizeof(pi)) > count)
if (len < sizeof(pi))
return -EINVAL;
len -= sizeof(pi);

if (memcpy_fromiovecend((void *)&pi, iv, 0, sizeof(pi)))
return -EFAULT;
offset += sizeof(pi);
}

if (tun->flags & TUN_VNET_HDR) {
if ((len -= tun->vnet_hdr_sz) > count)
if (len < tun->vnet_hdr_sz)
return -EINVAL;
len -= tun->vnet_hdr_sz;

if (memcpy_fromiovecend((void *)&gso, iv, offset, sizeof(gso)))
return -EFAULT;
Expand Down
2 changes: 2 additions & 0 deletions drivers/parisc/iommu-helpers.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include <linux/prefetch.h>

/**
* iommu_fill_pdir - Insert coalesced scatter/gather chunks into the I/O Pdir.
* @ioc: The I/O Controller.
Expand Down
1 change: 1 addition & 0 deletions drivers/pci/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ obj-$(CONFIG_UNICORE32) += setup-bus.o setup-irq.o
obj-$(CONFIG_PARISC) += setup-bus.o
obj-$(CONFIG_SUPERH) += setup-bus.o setup-irq.o
obj-$(CONFIG_PPC) += setup-bus.o
obj-$(CONFIG_FRV) += setup-bus.o
obj-$(CONFIG_MIPS) += setup-bus.o setup-irq.o
obj-$(CONFIG_X86_VISWS) += setup-irq.o
obj-$(CONFIG_MN10300) += setup-bus.o
Expand Down
2 changes: 2 additions & 0 deletions include/linux/icmpv6.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ static inline struct icmp6hdr *icmp6_hdr(const struct sk_buff *skb)
#define ICMPV6_NOT_NEIGHBOUR 2
#define ICMPV6_ADDR_UNREACH 3
#define ICMPV6_PORT_UNREACH 4
#define ICMPV6_POLICY_FAIL 5
#define ICMPV6_REJECT_ROUTE 6

/*
* Codes for Time Exceeded
Expand Down
1 change: 1 addition & 0 deletions include/linux/ipv6.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ struct inet6_skb_parm {
#define IP6SKB_XFRM_TRANSFORMED 1
#define IP6SKB_FORWARDED 2
#define IP6SKB_REROUTED 4
#define IP6SKB_FRAGMENTED 16
};

#define IP6CB(skb) ((struct inet6_skb_parm*)((skb)->cb))
Expand Down
3 changes: 2 additions & 1 deletion net/bridge/br_multicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,8 @@ static int br_ip6_multicast_query(struct net_bridge *br,
mld2q = (struct mld2_query *)icmp6_hdr(skb);
if (!mld2q->mld2q_nsrcs)
group = &mld2q->mld2q_mca;
max_delay = mld2q->mld2q_mrc ? MLDV2_MRC(mld2q->mld2q_mrc) : 1;

max_delay = max(msecs_to_jiffies(MLDV2_MRC(ntohs(mld2q->mld2q_mrc))), 1UL);
}

if (!group)
Expand Down
7 changes: 6 additions & 1 deletion net/core/sysctl_net_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
#include <net/sock.h>
#include <net/net_ratelimit.h>

static int zero = 0;
static int ushort_max = USHRT_MAX;

#ifdef CONFIG_RPS
static int rps_sock_flow_sysctl(ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos)
Expand Down Expand Up @@ -192,7 +195,9 @@ static struct ctl_table netns_core_table[] = {
.data = &init_net.core.sysctl_somaxconn,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dointvec
.extra1 = &zero,
.extra2 = &ushort_max,
.proc_handler = proc_dointvec_minmax
},
{ }
};
Expand Down
5 changes: 1 addition & 4 deletions net/ipv4/fib_trie.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
#include <linux/init.h>
#include <linux/list.h>
#include <linux/slab.h>
#include <linux/prefetch.h>
#include <net/net_namespace.h>
#include <net/ip.h>
#include <net/protocol.h>
Expand Down Expand Up @@ -1772,10 +1771,8 @@ static struct leaf *leaf_walk_rcu(struct tnode *p, struct rt_trie_node *c)
if (!c)
continue;

if (IS_LEAF(c)) {
prefetch(rcu_dereference_rtnl(p->child[idx]));
if (IS_LEAF(c))
return (struct leaf *) c;
}

/* Rescan start scanning in new node */
p = (struct tnode *) c;
Expand Down
12 changes: 7 additions & 5 deletions net/ipv4/tcp_cubic.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ static u32 cubic_root(u64 a)
*/
static inline void bictcp_update(struct bictcp *ca, u32 cwnd)
{
u64 offs;
u32 delta, t, bic_target, max_cnt;
u32 delta, bic_target, max_cnt;
u64 offs, t;

ca->ack_cnt++; /* count the number of ACKs */

Expand Down Expand Up @@ -248,9 +248,11 @@ static inline void bictcp_update(struct bictcp *ca, u32 cwnd)
* if the cwnd < 1 million packets !!!
*/

t = (s32)(tcp_time_stamp - ca->epoch_start);
t += msecs_to_jiffies(ca->delay_min >> 3);
/* change the unit from HZ to bictcp_HZ */
t = ((tcp_time_stamp + msecs_to_jiffies(ca->delay_min>>3)
- ca->epoch_start) << BICTCP_HZ) / HZ;
t <<= BICTCP_HZ;
do_div(t, HZ);

if (t < ca->bic_K) /* t - K */
offs = ca->bic_K - t;
Expand Down Expand Up @@ -412,7 +414,7 @@ static void bictcp_acked(struct sock *sk, u32 cnt, s32 rtt_us)
return;

/* Discard delay samples right after fast recovery */
if ((s32)(tcp_time_stamp - ca->epoch_start) < HZ)
if (ca->epoch_start && (s32)(tcp_time_stamp - ca->epoch_start) < HZ)
return;

delay = (rtt_us << 3) / USEC_PER_MSEC;
Expand Down
10 changes: 4 additions & 6 deletions net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -912,12 +912,10 @@ static int ipv6_create_tempaddr(struct inet6_ifaddr *ifp, struct inet6_ifaddr *i
if (ifp->flags & IFA_F_OPTIMISTIC)
addr_flags |= IFA_F_OPTIMISTIC;

ift = !max_addresses ||
ipv6_count_addresses(idev) < max_addresses ?
ipv6_add_addr(idev, &addr, tmp_plen,
ipv6_addr_type(&addr)&IPV6_ADDR_SCOPE_MASK,
addr_flags) : NULL;
if (!ift || IS_ERR(ift)) {
ift = ipv6_add_addr(idev, &addr, tmp_plen,
ipv6_addr_type(&addr)&IPV6_ADDR_SCOPE_MASK,
addr_flags);
if (IS_ERR(ift)) {
in6_ifa_put(ifp);
in6_dev_put(idev);
printk(KERN_INFO
Expand Down
10 changes: 9 additions & 1 deletion net/ipv6/icmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,14 @@ static const struct icmp6_err {
.err = ECONNREFUSED,
.fatal = 1,
},
{ /* POLICY_FAIL */
.err = EACCES,
.fatal = 1,
},
{ /* REJECT_ROUTE */
.err = EACCES,
.fatal = 1,
},
};

int icmpv6_err_convert(u8 type, u8 code, int *err)
Expand All @@ -934,7 +942,7 @@ int icmpv6_err_convert(u8 type, u8 code, int *err)
switch (type) {
case ICMPV6_DEST_UNREACH:
fatal = 1;
if (code <= ICMPV6_PORT_UNREACH) {
if (code < ARRAY_SIZE(tab_unreach)) {
*err = tab_unreach[code].err;
fatal = tab_unreach[code].fatal;
}
Expand Down
16 changes: 12 additions & 4 deletions net/ipv6/ip6_fib.c
Original file line number Diff line number Diff line change
Expand Up @@ -866,14 +866,22 @@ static struct fib6_node * fib6_lookup_1(struct fib6_node *root,

if (ipv6_prefix_equal(&key->addr, args->addr, key->plen)) {
#ifdef CONFIG_IPV6_SUBTREES
if (fn->subtree)
fn = fib6_lookup_1(fn->subtree, args + 1);
if (fn->subtree) {
struct fib6_node *sfn;
sfn = fib6_lookup_1(fn->subtree,
args + 1);
if (!sfn)
goto backtrack;
fn = sfn;
}
#endif
if (!fn || fn->fn_flags & RTN_RTINFO)
if (fn->fn_flags & RTN_RTINFO)
return fn;
}
}

#ifdef CONFIG_IPV6_SUBTREES
backtrack:
#endif
if (fn->fn_flags & RTN_ROOT)
break;

Expand Down
16 changes: 9 additions & 7 deletions net/ipv6/ndisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,6 @@ struct sk_buff *ndisc_build_skb(struct net_device *dev,
struct sk_buff *skb;
struct icmp6hdr *hdr;
int len;
int err;
u8 *opt;

if (!dev->addr_len)
Expand All @@ -466,14 +465,12 @@ struct sk_buff *ndisc_build_skb(struct net_device *dev,
if (llinfo)
len += ndisc_opt_addr_space(dev);

skb = sock_alloc_send_skb(sk,
(MAX_HEADER + sizeof(struct ipv6hdr) +
len + LL_ALLOCATED_SPACE(dev)),
1, &err);
skb = alloc_skb((MAX_HEADER + sizeof(struct ipv6hdr) +
len + LL_ALLOCATED_SPACE(dev)), GFP_ATOMIC);
if (!skb) {
ND_PRINTK0(KERN_ERR
"ICMPv6 ND: %s() failed to allocate an skb, err=%d.\n",
__func__, err);
"ICMPv6 ND: %s() failed to allocate an skb.\n",
__func__);
return NULL;
}

Expand Down Expand Up @@ -501,6 +498,11 @@ struct sk_buff *ndisc_build_skb(struct net_device *dev,
csum_partial(hdr,
len, 0));

/* Manually assign socket ownership as we avoid calling
* sock_alloc_send_pskb() to bypass wmem buffer limits
*/
skb_set_owner_w(skb, sk);

return skb;
}

Expand Down
5 changes: 5 additions & 0 deletions net/ipv6/reassembly.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,7 @@ static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *prev,
head->tstamp = fq->q.stamp;
ipv6_hdr(head)->payload_len = htons(payload_len);
IP6CB(head)->nhoff = nhoff;
IP6CB(head)->flags |= IP6SKB_FRAGMENTED;

/* Yes, and fold redundant checksum back. 8) */
if (head->ip_summed == CHECKSUM_COMPLETE)
Expand Down Expand Up @@ -556,6 +557,9 @@ static int ipv6_frag_rcv(struct sk_buff *skb)
const struct ipv6hdr *hdr = ipv6_hdr(skb);
struct net *net = dev_net(skb_dst(skb)->dev);

if (IP6CB(skb)->flags & IP6SKB_FRAGMENTED)
goto fail_hdr;

IP6_INC_STATS_BH(net, ip6_dst_idev(skb_dst(skb)), IPSTATS_MIB_REASMREQDS);

/* Jumbo payload inhibits frag. header */
Expand All @@ -576,6 +580,7 @@ static int ipv6_frag_rcv(struct sk_buff *skb)
ip6_dst_idev(skb_dst(skb)), IPSTATS_MIB_REASMOKS);

IP6CB(skb)->nhoff = (u8 *)fhdr - skb_network_header(skb);
IP6CB(skb)->flags |= IP6SKB_FRAGMENTED;
return 1;
}

Expand Down
2 changes: 1 addition & 1 deletion net/sched/sch_htb.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ struct htb_class {
unsigned int children;
struct htb_class *parent; /* parent class */

int prio; /* these two are used only by leaves... */
u32 prio; /* these two are used only by leaves... */
int quantum; /* but stored for parent-to-leaf return */

union {
Expand Down
Loading

0 comments on commit 7e4d6dd

Please sign in to comment.