From: Maxim Uvarov Date: Thu, 28 Jun 2012 14:47:37 +0000 (-0700) Subject: Merge branch 'uek-2.6.39-200' of ca-git.us.oracle.com:linux-uek-2.6.39 X-Git-Tag: v2.6.39-400.9.0~516 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=88208a8398ee2d74e481e22aec3c7518f9b44f27;p=users%2Fjedix%2Flinux-maple.git Merge branch 'uek-2.6.39-200' of ca-git.us.oracle.com:linux-uek-2.6.39 Conflicts: block/scsi_ioctl.c drivers/hwmon/fam15h_power.c drivers/infiniband/ulp/ipoib/ipoib_main.c drivers/infiniband/ulp/ipoib/ipoib_multicast.c drivers/md/dm-mpath.c drivers/net/Kconfig drivers/net/Makefile drivers/net/hxge/hxge_main.c drivers/net/hxge/hxge_txdma.c drivers/pci/pcie/aspm.c drivers/scsi/sd.c include/linux/if_vlan.h net/ipv4/route.c net/ipv6/route.c net/sunrpc/svc.c net/sunrpc/svc_xprt.c uek-rpm/ol5/kernel-uek.spec uek-rpm/ol6/config-generic uek-rpm/ol6/kernel-uek.spec Signed-off-by: Maxim Uvarov --- 88208a8398ee2d74e481e22aec3c7518f9b44f27 diff --cc block/scsi_ioctl.c index 5ef1f4c17e69,f132ce2f711c..9232880bf5a1 --- a/block/scsi_ioctl.c +++ b/block/scsi_ioctl.c @@@ -697,8 -696,8 +697,13 @@@ int scsi_verify_blk_ioctl(struct block_ if (bd && bd == bd->bd_contains) return 0; ++<<<<<<< HEAD + /* Actually none of these is particularly useful on a partition, + * but they are safe. ++======= + /* Actually none of this is particularly useful on a partition + * device, but let's play it safe. ++>>>>>>> acd92ae52cc861cfd30589404aed0dc2aafd44d0 */ switch (cmd) { case SCSI_IOCTL_GET_IDLUN: @@@ -712,21 -711,11 +717,29 @@@ case SG_SET_RESERVED_SIZE: case SG_EMULATED_HOST: return 0; ++<<<<<<< HEAD + case CDROM_GET_CAPABILITY: + /* Keep this until we remove the printk below. udev sends it + * and we do not want to spam dmesg about it. CD-ROMs do + * not have partitions, so we get here only for disks. + */ + return -ENOTTY; + default: + break; + } + + /* In particular, rule out all resets and host-specific ioctls. */ + printk_ratelimited(KERN_WARNING + "%s: sending ioctl %x to a partition!\n", current->comm, cmd); + + return capable(CAP_SYS_RAWIO) ? 0 : -ENOTTY; ++======= + default: + break; + } + /* In particular, rule out all resets and host-specific ioctls. */ + return -ENOTTY; ++>>>>>>> acd92ae52cc861cfd30589404aed0dc2aafd44d0 } EXPORT_SYMBOL(scsi_verify_blk_ioctl); diff --cc drivers/infiniband/ulp/ipoib/ipoib_main.c index b811444dcdd4,a98c414978ec..1b7903150489 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@@ -826,13 -834,18 +828,18 @@@ static int ipoib_hard_header(struct sk_ header->reserved = 0; /* - * If we don't have a neighbour structure, stuff the - * destination address onto the front of the skb so we can - * figure out where to send the packet later. + * If we don't have a dst_entry structure, stuff the + * destination address into skb->cb so we can figure out where + * to send the packet later. */ - if (!skb_dst(skb)) { - struct ipoib_cb *cb = (struct ipoib_cb *) skb->cb; - memcpy(cb->hwaddr, daddr, INFINIBAND_ALEN); + dst = skb_dst(skb); + n = NULL; + if (dst) + n = dst_get_neighbour_raw(dst); + if ((!dst || !n) && daddr) { + struct ipoib_pseudoheader *phdr = + (struct ipoib_pseudoheader *) skb_push(skb, sizeof *phdr); + memcpy(phdr->hwaddr, daddr, INFINIBAND_ALEN); } return 0; diff --cc net/ipv4/ip_options.c index 42dd1a90edea,1e60f7679075..11e62bb81dfd --- a/net/ipv4/ip_options.c +++ b/net/ipv4/ip_options.c @@@ -573,8 -573,8 +573,9 @@@ void ip_forward_options(struct sk_buff } if (srrptr + 3 <= srrspace) { opt->is_changed = 1; + ip_hdr(skb)->daddr = opt->nexthop; ip_rt_get_source(&optptr[srrptr-1], skb, rt); + ip_hdr(skb)->daddr = opt->nexthop; optptr[2] = srrptr+4; } else if (net_ratelimit()) printk(KERN_CRIT "ip_forward(): Argh! Destination lost!\n"); diff --cc net/ipv6/route.c index e70e902a5d06,8e600f827fe7..bb38ca57f7ed --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@@ -2411,8 -2411,12 +2411,17 @@@ static int rt6_fill_node(struct net *ne rcu_read_lock(); n = dst_get_neighbour(&rt->dst); ++<<<<<<< HEAD + if (n) + NLA_PUT(skb, RTA_GATEWAY, 16, &n->primary_key); ++======= + if (n) { + if (nla_put(skb, RTA_GATEWAY, 16, &n->primary_key) < 0) { + rcu_read_unlock(); + goto nla_put_failure; + } + } ++>>>>>>> acd92ae52cc861cfd30589404aed0dc2aafd44d0 rcu_read_unlock(); if (rt->dst.dev) diff --cc net/sunrpc/svc_xprt.c index 9d7ed0b48b51,9cb2621a8826..69dda93f161d --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c @@@ -932,47 -939,30 +932,56 @@@ EXPORT_SYMBOL_GPL(svc_close_xprt) static void svc_close_list(struct list_head *xprt_list) { struct svc_xprt *xprt; + + list_for_each_entry(xprt, xprt_list, xpt_list) { + set_bit(XPT_CLOSE, &xprt->xpt_flags); + set_bit(XPT_BUSY, &xprt->xpt_flags); + } +} + +void svc_close_all(struct svc_serv *serv) +{ + struct svc_pool *pool; + struct svc_xprt *xprt; struct svc_xprt *tmp; + int i; + + svc_close_list(&serv->sv_tempsocks); + svc_close_list(&serv->sv_permsocks); + + for (i = 0; i < serv->sv_nrpools; i++) { + pool = &serv->sv_pools[i]; + spin_lock_bh(&pool->sp_lock); + while (!list_empty(&pool->sp_sockets)) { + xprt = list_first_entry(&pool->sp_sockets, struct svc_xprt, xpt_ready); + list_del_init(&xprt->xpt_ready); + } + spin_unlock_bh(&pool->sp_lock); + } /* - * The server is shutting down, and no more threads are running. - * svc_xprt_enqueue() might still be running, but at worst it - * will re-add the xprt to sp_sockets, which will soon get - * freed. So we don't bother with any more locking, and don't - * leave the close to the (nonexistent) server threads: + * At this point the sp_sockets lists will stay empty, since + * svc_enqueue will not add new entries without taking the + * sp_lock and checking XPT_BUSY. */ - list_for_each_entry_safe(xprt, tmp, xprt_list, xpt_list) { - set_bit(XPT_CLOSE, &xprt->xpt_flags); + list_for_each_entry_safe(xprt, tmp, &serv->sv_tempsocks, xpt_list) svc_delete_xprt(xprt); - } + list_for_each_entry_safe(xprt, tmp, &serv->sv_permsocks, xpt_list) + svc_delete_xprt(xprt); + + BUG_ON(!list_empty(&serv->sv_permsocks)); + BUG_ON(!list_empty(&serv->sv_tempsocks)); } + void svc_close_all(struct svc_serv *serv) + { + svc_close_list(&serv->sv_tempsocks); + svc_close_list(&serv->sv_permsocks); + BUG_ON(!list_empty(&serv->sv_permsocks)); + BUG_ON(!list_empty(&serv->sv_tempsocks)); + + } + /* * Handle defer and revisit of requests */