diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2012-07-25 08:33:45 -0400 |
|---|---|---|
| committer | Arnd Bergmann <arnd@arndb.de> | 2012-07-25 08:35:04 -0400 |
| commit | 8cef081c71dd4e16a01a1e63cedab21eef8b5735 (patch) | |
| tree | b5b0fb5ab09dc60dee5fc8fd8e980359abbd1b1e /kernel | |
| parent | 3d55c29fb24286f350f04021bef2dd799e25dd20 (diff) | |
| parent | 9161c3b796a2841a9a7be3d9c9dd121269ce90e8 (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into fixes
The merge of the 'clk-for-linus' branch caused an automated
merge failure. Pull that in here so we can fix the problem.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/audit.c | 30 | ||||
| -rw-r--r-- | kernel/irq/irqdomain.c | 8 | ||||
| -rw-r--r-- | kernel/resource.c | 13 |
3 files changed, 30 insertions, 21 deletions
diff --git a/kernel/audit.c b/kernel/audit.c index 1c7f2c61416b..4a3f28d2ca65 100644 --- a/kernel/audit.c +++ b/kernel/audit.c | |||
| @@ -384,7 +384,7 @@ static void audit_hold_skb(struct sk_buff *skb) | |||
| 384 | static void audit_printk_skb(struct sk_buff *skb) | 384 | static void audit_printk_skb(struct sk_buff *skb) |
| 385 | { | 385 | { |
| 386 | struct nlmsghdr *nlh = nlmsg_hdr(skb); | 386 | struct nlmsghdr *nlh = nlmsg_hdr(skb); |
| 387 | char *data = NLMSG_DATA(nlh); | 387 | char *data = nlmsg_data(nlh); |
| 388 | 388 | ||
| 389 | if (nlh->nlmsg_type != AUDIT_EOE) { | 389 | if (nlh->nlmsg_type != AUDIT_EOE) { |
| 390 | if (printk_ratelimit()) | 390 | if (printk_ratelimit()) |
| @@ -516,14 +516,15 @@ struct sk_buff *audit_make_reply(int pid, int seq, int type, int done, | |||
| 516 | if (!skb) | 516 | if (!skb) |
| 517 | return NULL; | 517 | return NULL; |
| 518 | 518 | ||
| 519 | nlh = NLMSG_NEW(skb, pid, seq, t, size, flags); | 519 | nlh = nlmsg_put(skb, pid, seq, t, size, flags); |
| 520 | data = NLMSG_DATA(nlh); | 520 | if (!nlh) |
| 521 | goto out_kfree_skb; | ||
| 522 | data = nlmsg_data(nlh); | ||
| 521 | memcpy(data, payload, size); | 523 | memcpy(data, payload, size); |
| 522 | return skb; | 524 | return skb; |
| 523 | 525 | ||
| 524 | nlmsg_failure: /* Used by NLMSG_NEW */ | 526 | out_kfree_skb: |
| 525 | if (skb) | 527 | kfree_skb(skb); |
| 526 | kfree_skb(skb); | ||
| 527 | return NULL; | 528 | return NULL; |
| 528 | } | 529 | } |
| 529 | 530 | ||
| @@ -680,7 +681,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh) | |||
| 680 | sessionid = audit_get_sessionid(current); | 681 | sessionid = audit_get_sessionid(current); |
| 681 | security_task_getsecid(current, &sid); | 682 | security_task_getsecid(current, &sid); |
| 682 | seq = nlh->nlmsg_seq; | 683 | seq = nlh->nlmsg_seq; |
| 683 | data = NLMSG_DATA(nlh); | 684 | data = nlmsg_data(nlh); |
| 684 | 685 | ||
| 685 | switch (msg_type) { | 686 | switch (msg_type) { |
| 686 | case AUDIT_GET: | 687 | case AUDIT_GET: |
| @@ -961,14 +962,17 @@ static void audit_receive(struct sk_buff *skb) | |||
| 961 | static int __init audit_init(void) | 962 | static int __init audit_init(void) |
| 962 | { | 963 | { |
| 963 | int i; | 964 | int i; |
| 965 | struct netlink_kernel_cfg cfg = { | ||
| 966 | .input = audit_receive, | ||
| 967 | }; | ||
| 964 | 968 | ||
| 965 | if (audit_initialized == AUDIT_DISABLED) | 969 | if (audit_initialized == AUDIT_DISABLED) |
| 966 | return 0; | 970 | return 0; |
| 967 | 971 | ||
| 968 | printk(KERN_INFO "audit: initializing netlink socket (%s)\n", | 972 | printk(KERN_INFO "audit: initializing netlink socket (%s)\n", |
| 969 | audit_default ? "enabled" : "disabled"); | 973 | audit_default ? "enabled" : "disabled"); |
| 970 | audit_sock = netlink_kernel_create(&init_net, NETLINK_AUDIT, 0, | 974 | audit_sock = netlink_kernel_create(&init_net, NETLINK_AUDIT, |
| 971 | audit_receive, NULL, THIS_MODULE); | 975 | THIS_MODULE, &cfg); |
| 972 | if (!audit_sock) | 976 | if (!audit_sock) |
| 973 | audit_panic("cannot initialize netlink socket"); | 977 | audit_panic("cannot initialize netlink socket"); |
| 974 | else | 978 | else |
| @@ -1060,13 +1064,15 @@ static struct audit_buffer * audit_buffer_alloc(struct audit_context *ctx, | |||
| 1060 | 1064 | ||
| 1061 | ab->skb = nlmsg_new(AUDIT_BUFSIZ, gfp_mask); | 1065 | ab->skb = nlmsg_new(AUDIT_BUFSIZ, gfp_mask); |
| 1062 | if (!ab->skb) | 1066 | if (!ab->skb) |
| 1063 | goto nlmsg_failure; | 1067 | goto err; |
| 1064 | 1068 | ||
| 1065 | nlh = NLMSG_NEW(ab->skb, 0, 0, type, 0, 0); | 1069 | nlh = nlmsg_put(ab->skb, 0, 0, type, 0, 0); |
| 1070 | if (!nlh) | ||
| 1071 | goto out_kfree_skb; | ||
| 1066 | 1072 | ||
| 1067 | return ab; | 1073 | return ab; |
| 1068 | 1074 | ||
| 1069 | nlmsg_failure: /* Used by NLMSG_NEW */ | 1075 | out_kfree_skb: |
| 1070 | kfree_skb(ab->skb); | 1076 | kfree_skb(ab->skb); |
| 1071 | ab->skb = NULL; | 1077 | ab->skb = NULL; |
| 1072 | err: | 1078 | err: |
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 41c1564103f1..38c5eb839c92 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c | |||
| @@ -448,7 +448,7 @@ unsigned int irq_create_mapping(struct irq_domain *domain, | |||
| 448 | } | 448 | } |
| 449 | 449 | ||
| 450 | pr_debug("irq %lu on domain %s mapped to virtual irq %u\n", | 450 | pr_debug("irq %lu on domain %s mapped to virtual irq %u\n", |
| 451 | hwirq, domain->of_node ? domain->of_node->full_name : "null", virq); | 451 | hwirq, of_node_full_name(domain->of_node), virq); |
| 452 | 452 | ||
| 453 | return virq; | 453 | return virq; |
| 454 | } | 454 | } |
| @@ -477,7 +477,7 @@ unsigned int irq_create_of_mapping(struct device_node *controller, | |||
| 477 | return intspec[0]; | 477 | return intspec[0]; |
| 478 | #endif | 478 | #endif |
| 479 | pr_warning("no irq domain found for %s !\n", | 479 | pr_warning("no irq domain found for %s !\n", |
| 480 | controller->full_name); | 480 | of_node_full_name(controller)); |
| 481 | return 0; | 481 | return 0; |
| 482 | } | 482 | } |
| 483 | 483 | ||
| @@ -725,8 +725,8 @@ static int virq_debug_show(struct seq_file *m, void *private) | |||
| 725 | data = irq_desc_get_chip_data(desc); | 725 | data = irq_desc_get_chip_data(desc); |
| 726 | seq_printf(m, data ? "0x%p " : " %p ", data); | 726 | seq_printf(m, data ? "0x%p " : " %p ", data); |
| 727 | 727 | ||
| 728 | if (desc->irq_data.domain && desc->irq_data.domain->of_node) | 728 | if (desc->irq_data.domain) |
| 729 | p = desc->irq_data.domain->of_node->full_name; | 729 | p = of_node_full_name(desc->irq_data.domain->of_node); |
| 730 | else | 730 | else |
| 731 | p = none; | 731 | p = none; |
| 732 | seq_printf(m, "%s\n", p); | 732 | seq_printf(m, "%s\n", p); |
diff --git a/kernel/resource.c b/kernel/resource.c index e1d2b8ee76d5..dc8b47764443 100644 --- a/kernel/resource.c +++ b/kernel/resource.c | |||
| @@ -722,14 +722,12 @@ int adjust_resource(struct resource *res, resource_size_t start, resource_size_t | |||
| 722 | 722 | ||
| 723 | write_lock(&resource_lock); | 723 | write_lock(&resource_lock); |
| 724 | 724 | ||
| 725 | if (!parent) | ||
| 726 | goto skip; | ||
| 727 | |||
| 725 | if ((start < parent->start) || (end > parent->end)) | 728 | if ((start < parent->start) || (end > parent->end)) |
| 726 | goto out; | 729 | goto out; |
| 727 | 730 | ||
| 728 | for (tmp = res->child; tmp; tmp = tmp->sibling) { | ||
| 729 | if ((tmp->start < start) || (tmp->end > end)) | ||
| 730 | goto out; | ||
| 731 | } | ||
| 732 | |||
| 733 | if (res->sibling && (res->sibling->start <= end)) | 731 | if (res->sibling && (res->sibling->start <= end)) |
| 734 | goto out; | 732 | goto out; |
| 735 | 733 | ||
| @@ -741,6 +739,11 @@ int adjust_resource(struct resource *res, resource_size_t start, resource_size_t | |||
| 741 | goto out; | 739 | goto out; |
| 742 | } | 740 | } |
| 743 | 741 | ||
| 742 | skip: | ||
| 743 | for (tmp = res->child; tmp; tmp = tmp->sibling) | ||
| 744 | if ((tmp->start < start) || (tmp->end > end)) | ||
| 745 | goto out; | ||
| 746 | |||
| 744 | res->start = start; | 747 | res->start = start; |
| 745 | res->end = end; | 748 | res->end = end; |
| 746 | result = 0; | 749 | result = 0; |
