diff options
Diffstat (limited to 'net')
| -rw-r--r-- | net/ceph/buffer.c | 2 | ||||
| -rw-r--r-- | net/ceph/messenger.c | 13 | ||||
| -rw-r--r-- | net/ceph/osd_client.c | 25 | ||||
| -rw-r--r-- | net/ceph/pagevec.c | 3 | ||||
| -rw-r--r-- | net/core/filter.c | 2 | ||||
| -rw-r--r-- | net/core/net-sysfs.c | 10 | ||||
| -rw-r--r-- | net/core/request_sock.c | 4 | ||||
| -rw-r--r-- | net/ipv4/fib_trie.c | 2 | ||||
| -rw-r--r-- | net/ipv4/icmp.c | 3 | ||||
| -rw-r--r-- | net/ipv6/addrconf.c | 34 | ||||
| -rw-r--r-- | net/irda/af_irda.c | 1 | ||||
| -rw-r--r-- | net/irda/irnet/irnet_ppp.c | 1 | ||||
| -rw-r--r-- | net/irda/irttp.c | 30 | ||||
| -rw-r--r-- | net/netfilter/ipvs/Kconfig | 1 | ||||
| -rw-r--r-- | net/rds/rdma.c | 2 | ||||
| -rw-r--r-- | net/sunrpc/clnt.c | 24 | ||||
| -rw-r--r-- | net/sunrpc/stats.c | 4 | ||||
| -rw-r--r-- | net/sunrpc/svc_xprt.c | 1 | ||||
| -rw-r--r-- | net/wireless/chan.c | 54 | ||||
| -rw-r--r-- | net/xfrm/xfrm_hash.c | 2 |
20 files changed, 153 insertions, 65 deletions
diff --git a/net/ceph/buffer.c b/net/ceph/buffer.c index 53d8abfa25d5..bf3e6a13c215 100644 --- a/net/ceph/buffer.c +++ b/net/ceph/buffer.c | |||
| @@ -19,7 +19,7 @@ struct ceph_buffer *ceph_buffer_new(size_t len, gfp_t gfp) | |||
| 19 | if (b->vec.iov_base) { | 19 | if (b->vec.iov_base) { |
| 20 | b->is_vmalloc = false; | 20 | b->is_vmalloc = false; |
| 21 | } else { | 21 | } else { |
| 22 | b->vec.iov_base = __vmalloc(len, gfp, PAGE_KERNEL); | 22 | b->vec.iov_base = __vmalloc(len, gfp | __GFP_HIGHMEM, PAGE_KERNEL); |
| 23 | if (!b->vec.iov_base) { | 23 | if (!b->vec.iov_base) { |
| 24 | kfree(b); | 24 | kfree(b); |
| 25 | return NULL; | 25 | return NULL; |
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 0e8157ee5d43..1c7a2ec4f3cc 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c | |||
| @@ -540,8 +540,7 @@ static void prepare_write_message(struct ceph_connection *con) | |||
| 540 | /* initialize page iterator */ | 540 | /* initialize page iterator */ |
| 541 | con->out_msg_pos.page = 0; | 541 | con->out_msg_pos.page = 0; |
| 542 | if (m->pages) | 542 | if (m->pages) |
| 543 | con->out_msg_pos.page_pos = | 543 | con->out_msg_pos.page_pos = m->page_alignment; |
| 544 | le16_to_cpu(m->hdr.data_off) & ~PAGE_MASK; | ||
| 545 | else | 544 | else |
| 546 | con->out_msg_pos.page_pos = 0; | 545 | con->out_msg_pos.page_pos = 0; |
| 547 | con->out_msg_pos.data_pos = 0; | 546 | con->out_msg_pos.data_pos = 0; |
| @@ -1491,7 +1490,7 @@ static int read_partial_message(struct ceph_connection *con) | |||
| 1491 | struct ceph_msg *m = con->in_msg; | 1490 | struct ceph_msg *m = con->in_msg; |
| 1492 | int ret; | 1491 | int ret; |
| 1493 | int to, left; | 1492 | int to, left; |
| 1494 | unsigned front_len, middle_len, data_len, data_off; | 1493 | unsigned front_len, middle_len, data_len; |
| 1495 | int datacrc = con->msgr->nocrc; | 1494 | int datacrc = con->msgr->nocrc; |
| 1496 | int skip; | 1495 | int skip; |
| 1497 | u64 seq; | 1496 | u64 seq; |
| @@ -1527,19 +1526,17 @@ static int read_partial_message(struct ceph_connection *con) | |||
| 1527 | data_len = le32_to_cpu(con->in_hdr.data_len); | 1526 | data_len = le32_to_cpu(con->in_hdr.data_len); |
| 1528 | if (data_len > CEPH_MSG_MAX_DATA_LEN) | 1527 | if (data_len > CEPH_MSG_MAX_DATA_LEN) |
| 1529 | return -EIO; | 1528 | return -EIO; |
| 1530 | data_off = le16_to_cpu(con->in_hdr.data_off); | ||
| 1531 | 1529 | ||
| 1532 | /* verify seq# */ | 1530 | /* verify seq# */ |
| 1533 | seq = le64_to_cpu(con->in_hdr.seq); | 1531 | seq = le64_to_cpu(con->in_hdr.seq); |
| 1534 | if ((s64)seq - (s64)con->in_seq < 1) { | 1532 | if ((s64)seq - (s64)con->in_seq < 1) { |
| 1535 | pr_info("skipping %s%lld %s seq %lld, expected %lld\n", | 1533 | pr_info("skipping %s%lld %s seq %lld expected %lld\n", |
| 1536 | ENTITY_NAME(con->peer_name), | 1534 | ENTITY_NAME(con->peer_name), |
| 1537 | ceph_pr_addr(&con->peer_addr.in_addr), | 1535 | ceph_pr_addr(&con->peer_addr.in_addr), |
| 1538 | seq, con->in_seq + 1); | 1536 | seq, con->in_seq + 1); |
| 1539 | con->in_base_pos = -front_len - middle_len - data_len - | 1537 | con->in_base_pos = -front_len - middle_len - data_len - |
| 1540 | sizeof(m->footer); | 1538 | sizeof(m->footer); |
| 1541 | con->in_tag = CEPH_MSGR_TAG_READY; | 1539 | con->in_tag = CEPH_MSGR_TAG_READY; |
| 1542 | con->in_seq++; | ||
| 1543 | return 0; | 1540 | return 0; |
| 1544 | } else if ((s64)seq - (s64)con->in_seq > 1) { | 1541 | } else if ((s64)seq - (s64)con->in_seq > 1) { |
| 1545 | pr_err("read_partial_message bad seq %lld expected %lld\n", | 1542 | pr_err("read_partial_message bad seq %lld expected %lld\n", |
| @@ -1576,7 +1573,7 @@ static int read_partial_message(struct ceph_connection *con) | |||
| 1576 | 1573 | ||
| 1577 | con->in_msg_pos.page = 0; | 1574 | con->in_msg_pos.page = 0; |
| 1578 | if (m->pages) | 1575 | if (m->pages) |
| 1579 | con->in_msg_pos.page_pos = data_off & ~PAGE_MASK; | 1576 | con->in_msg_pos.page_pos = m->page_alignment; |
| 1580 | else | 1577 | else |
| 1581 | con->in_msg_pos.page_pos = 0; | 1578 | con->in_msg_pos.page_pos = 0; |
| 1582 | con->in_msg_pos.data_pos = 0; | 1579 | con->in_msg_pos.data_pos = 0; |
| @@ -2301,6 +2298,7 @@ struct ceph_msg *ceph_msg_new(int type, int front_len, gfp_t flags) | |||
| 2301 | 2298 | ||
| 2302 | /* data */ | 2299 | /* data */ |
| 2303 | m->nr_pages = 0; | 2300 | m->nr_pages = 0; |
| 2301 | m->page_alignment = 0; | ||
| 2304 | m->pages = NULL; | 2302 | m->pages = NULL; |
| 2305 | m->pagelist = NULL; | 2303 | m->pagelist = NULL; |
| 2306 | m->bio = NULL; | 2304 | m->bio = NULL; |
| @@ -2370,6 +2368,7 @@ static struct ceph_msg *ceph_alloc_msg(struct ceph_connection *con, | |||
| 2370 | type, front_len); | 2368 | type, front_len); |
| 2371 | return NULL; | 2369 | return NULL; |
| 2372 | } | 2370 | } |
| 2371 | msg->page_alignment = le16_to_cpu(hdr->data_off); | ||
| 2373 | } | 2372 | } |
| 2374 | memcpy(&msg->hdr, &con->in_hdr, sizeof(con->in_hdr)); | 2373 | memcpy(&msg->hdr, &con->in_hdr, sizeof(con->in_hdr)); |
| 2375 | 2374 | ||
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index 79391994b3ed..3e20a122ffa2 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c | |||
| @@ -71,6 +71,7 @@ void ceph_calc_raw_layout(struct ceph_osd_client *osdc, | |||
| 71 | op->extent.length = objlen; | 71 | op->extent.length = objlen; |
| 72 | } | 72 | } |
| 73 | req->r_num_pages = calc_pages_for(off, *plen); | 73 | req->r_num_pages = calc_pages_for(off, *plen); |
| 74 | req->r_page_alignment = off & ~PAGE_MASK; | ||
| 74 | if (op->op == CEPH_OSD_OP_WRITE) | 75 | if (op->op == CEPH_OSD_OP_WRITE) |
| 75 | op->payload_len = *plen; | 76 | op->payload_len = *plen; |
| 76 | 77 | ||
| @@ -390,6 +391,8 @@ void ceph_osdc_build_request(struct ceph_osd_request *req, | |||
| 390 | req->r_request->hdr.data_len = cpu_to_le32(data_len); | 391 | req->r_request->hdr.data_len = cpu_to_le32(data_len); |
| 391 | } | 392 | } |
| 392 | 393 | ||
| 394 | req->r_request->page_alignment = req->r_page_alignment; | ||
| 395 | |||
| 393 | BUG_ON(p > msg->front.iov_base + msg->front.iov_len); | 396 | BUG_ON(p > msg->front.iov_base + msg->front.iov_len); |
| 394 | msg_size = p - msg->front.iov_base; | 397 | msg_size = p - msg->front.iov_base; |
| 395 | msg->front.iov_len = msg_size; | 398 | msg->front.iov_len = msg_size; |
| @@ -419,7 +422,8 @@ struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *osdc, | |||
| 419 | u32 truncate_seq, | 422 | u32 truncate_seq, |
| 420 | u64 truncate_size, | 423 | u64 truncate_size, |
| 421 | struct timespec *mtime, | 424 | struct timespec *mtime, |
| 422 | bool use_mempool, int num_reply) | 425 | bool use_mempool, int num_reply, |
| 426 | int page_align) | ||
| 423 | { | 427 | { |
| 424 | struct ceph_osd_req_op ops[3]; | 428 | struct ceph_osd_req_op ops[3]; |
| 425 | struct ceph_osd_request *req; | 429 | struct ceph_osd_request *req; |
| @@ -447,6 +451,10 @@ struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *osdc, | |||
| 447 | calc_layout(osdc, vino, layout, off, plen, req, ops); | 451 | calc_layout(osdc, vino, layout, off, plen, req, ops); |
| 448 | req->r_file_layout = *layout; /* keep a copy */ | 452 | req->r_file_layout = *layout; /* keep a copy */ |
| 449 | 453 | ||
| 454 | /* in case it differs from natural alignment that calc_layout | ||
| 455 | filled in for us */ | ||
| 456 | req->r_page_alignment = page_align; | ||
| 457 | |||
| 450 | ceph_osdc_build_request(req, off, plen, ops, | 458 | ceph_osdc_build_request(req, off, plen, ops, |
| 451 | snapc, | 459 | snapc, |
| 452 | mtime, | 460 | mtime, |
| @@ -1489,7 +1497,7 @@ int ceph_osdc_readpages(struct ceph_osd_client *osdc, | |||
| 1489 | struct ceph_vino vino, struct ceph_file_layout *layout, | 1497 | struct ceph_vino vino, struct ceph_file_layout *layout, |
| 1490 | u64 off, u64 *plen, | 1498 | u64 off, u64 *plen, |
| 1491 | u32 truncate_seq, u64 truncate_size, | 1499 | u32 truncate_seq, u64 truncate_size, |
| 1492 | struct page **pages, int num_pages) | 1500 | struct page **pages, int num_pages, int page_align) |
| 1493 | { | 1501 | { |
| 1494 | struct ceph_osd_request *req; | 1502 | struct ceph_osd_request *req; |
| 1495 | int rc = 0; | 1503 | int rc = 0; |
| @@ -1499,15 +1507,15 @@ int ceph_osdc_readpages(struct ceph_osd_client *osdc, | |||
| 1499 | req = ceph_osdc_new_request(osdc, layout, vino, off, plen, | 1507 | req = ceph_osdc_new_request(osdc, layout, vino, off, plen, |
| 1500 | CEPH_OSD_OP_READ, CEPH_OSD_FLAG_READ, | 1508 | CEPH_OSD_OP_READ, CEPH_OSD_FLAG_READ, |
| 1501 | NULL, 0, truncate_seq, truncate_size, NULL, | 1509 | NULL, 0, truncate_seq, truncate_size, NULL, |
| 1502 | false, 1); | 1510 | false, 1, page_align); |
| 1503 | if (!req) | 1511 | if (!req) |
| 1504 | return -ENOMEM; | 1512 | return -ENOMEM; |
| 1505 | 1513 | ||
| 1506 | /* it may be a short read due to an object boundary */ | 1514 | /* it may be a short read due to an object boundary */ |
| 1507 | req->r_pages = pages; | 1515 | req->r_pages = pages; |
| 1508 | 1516 | ||
| 1509 | dout("readpages final extent is %llu~%llu (%d pages)\n", | 1517 | dout("readpages final extent is %llu~%llu (%d pages align %d)\n", |
| 1510 | off, *plen, req->r_num_pages); | 1518 | off, *plen, req->r_num_pages, page_align); |
| 1511 | 1519 | ||
| 1512 | rc = ceph_osdc_start_request(osdc, req, false); | 1520 | rc = ceph_osdc_start_request(osdc, req, false); |
| 1513 | if (!rc) | 1521 | if (!rc) |
| @@ -1533,6 +1541,7 @@ int ceph_osdc_writepages(struct ceph_osd_client *osdc, struct ceph_vino vino, | |||
| 1533 | { | 1541 | { |
| 1534 | struct ceph_osd_request *req; | 1542 | struct ceph_osd_request *req; |
| 1535 | int rc = 0; | 1543 | int rc = 0; |
| 1544 | int page_align = off & ~PAGE_MASK; | ||
| 1536 | 1545 | ||
| 1537 | BUG_ON(vino.snap != CEPH_NOSNAP); | 1546 | BUG_ON(vino.snap != CEPH_NOSNAP); |
| 1538 | req = ceph_osdc_new_request(osdc, layout, vino, off, &len, | 1547 | req = ceph_osdc_new_request(osdc, layout, vino, off, &len, |
| @@ -1541,7 +1550,7 @@ int ceph_osdc_writepages(struct ceph_osd_client *osdc, struct ceph_vino vino, | |||
| 1541 | CEPH_OSD_FLAG_WRITE, | 1550 | CEPH_OSD_FLAG_WRITE, |
| 1542 | snapc, do_sync, | 1551 | snapc, do_sync, |
| 1543 | truncate_seq, truncate_size, mtime, | 1552 | truncate_seq, truncate_size, mtime, |
| 1544 | nofail, 1); | 1553 | nofail, 1, page_align); |
| 1545 | if (!req) | 1554 | if (!req) |
| 1546 | return -ENOMEM; | 1555 | return -ENOMEM; |
| 1547 | 1556 | ||
| @@ -1638,8 +1647,7 @@ static struct ceph_msg *get_reply(struct ceph_connection *con, | |||
| 1638 | m = ceph_msg_get(req->r_reply); | 1647 | m = ceph_msg_get(req->r_reply); |
| 1639 | 1648 | ||
| 1640 | if (data_len > 0) { | 1649 | if (data_len > 0) { |
| 1641 | unsigned data_off = le16_to_cpu(hdr->data_off); | 1650 | int want = calc_pages_for(req->r_page_alignment, data_len); |
| 1642 | int want = calc_pages_for(data_off & ~PAGE_MASK, data_len); | ||
| 1643 | 1651 | ||
| 1644 | if (unlikely(req->r_num_pages < want)) { | 1652 | if (unlikely(req->r_num_pages < want)) { |
| 1645 | pr_warning("tid %lld reply %d > expected %d pages\n", | 1653 | pr_warning("tid %lld reply %d > expected %d pages\n", |
| @@ -1651,6 +1659,7 @@ static struct ceph_msg *get_reply(struct ceph_connection *con, | |||
| 1651 | } | 1659 | } |
| 1652 | m->pages = req->r_pages; | 1660 | m->pages = req->r_pages; |
| 1653 | m->nr_pages = req->r_num_pages; | 1661 | m->nr_pages = req->r_num_pages; |
| 1662 | m->page_alignment = req->r_page_alignment; | ||
| 1654 | #ifdef CONFIG_BLOCK | 1663 | #ifdef CONFIG_BLOCK |
| 1655 | m->bio = req->r_bio; | 1664 | m->bio = req->r_bio; |
| 1656 | #endif | 1665 | #endif |
diff --git a/net/ceph/pagevec.c b/net/ceph/pagevec.c index 54caf0687155..ac34feeb2b3a 100644 --- a/net/ceph/pagevec.c +++ b/net/ceph/pagevec.c | |||
| @@ -13,8 +13,7 @@ | |||
| 13 | * build a vector of user pages | 13 | * build a vector of user pages |
| 14 | */ | 14 | */ |
| 15 | struct page **ceph_get_direct_page_vector(const char __user *data, | 15 | struct page **ceph_get_direct_page_vector(const char __user *data, |
| 16 | int num_pages, | 16 | int num_pages) |
| 17 | loff_t off, size_t len) | ||
| 18 | { | 17 | { |
| 19 | struct page **pages; | 18 | struct page **pages; |
| 20 | int rc; | 19 | int rc; |
diff --git a/net/core/filter.c b/net/core/filter.c index 23e9b2a6b4c8..c1ee800bc080 100644 --- a/net/core/filter.c +++ b/net/core/filter.c | |||
| @@ -589,7 +589,7 @@ int sk_chk_filter(struct sock_filter *filter, int flen) | |||
| 589 | EXPORT_SYMBOL(sk_chk_filter); | 589 | EXPORT_SYMBOL(sk_chk_filter); |
| 590 | 590 | ||
| 591 | /** | 591 | /** |
| 592 | * sk_filter_rcu_release: Release a socket filter by rcu_head | 592 | * sk_filter_rcu_release - Release a socket filter by rcu_head |
| 593 | * @rcu: rcu_head that contains the sk_filter to free | 593 | * @rcu: rcu_head that contains the sk_filter to free |
| 594 | */ | 594 | */ |
| 595 | static void sk_filter_rcu_release(struct rcu_head *rcu) | 595 | static void sk_filter_rcu_release(struct rcu_head *rcu) |
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index a5ff5a89f376..7f902cad10f8 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c | |||
| @@ -712,15 +712,21 @@ static void rx_queue_release(struct kobject *kobj) | |||
| 712 | 712 | ||
| 713 | 713 | ||
| 714 | map = rcu_dereference_raw(queue->rps_map); | 714 | map = rcu_dereference_raw(queue->rps_map); |
| 715 | if (map) | 715 | if (map) { |
| 716 | RCU_INIT_POINTER(queue->rps_map, NULL); | ||
| 716 | call_rcu(&map->rcu, rps_map_release); | 717 | call_rcu(&map->rcu, rps_map_release); |
| 718 | } | ||
| 717 | 719 | ||
| 718 | flow_table = rcu_dereference_raw(queue->rps_flow_table); | 720 | flow_table = rcu_dereference_raw(queue->rps_flow_table); |
| 719 | if (flow_table) | 721 | if (flow_table) { |
| 722 | RCU_INIT_POINTER(queue->rps_flow_table, NULL); | ||
| 720 | call_rcu(&flow_table->rcu, rps_dev_flow_table_release); | 723 | call_rcu(&flow_table->rcu, rps_dev_flow_table_release); |
| 724 | } | ||
| 721 | 725 | ||
| 722 | if (atomic_dec_and_test(&first->count)) | 726 | if (atomic_dec_and_test(&first->count)) |
| 723 | kfree(first); | 727 | kfree(first); |
| 728 | else | ||
| 729 | memset(kobj, 0, sizeof(*kobj)); | ||
| 724 | } | 730 | } |
| 725 | 731 | ||
| 726 | static struct kobj_type rx_queue_ktype = { | 732 | static struct kobj_type rx_queue_ktype = { |
diff --git a/net/core/request_sock.c b/net/core/request_sock.c index 7552495aff7a..fceeb37d7161 100644 --- a/net/core/request_sock.c +++ b/net/core/request_sock.c | |||
| @@ -45,9 +45,7 @@ int reqsk_queue_alloc(struct request_sock_queue *queue, | |||
| 45 | nr_table_entries = roundup_pow_of_two(nr_table_entries + 1); | 45 | nr_table_entries = roundup_pow_of_two(nr_table_entries + 1); |
| 46 | lopt_size += nr_table_entries * sizeof(struct request_sock *); | 46 | lopt_size += nr_table_entries * sizeof(struct request_sock *); |
| 47 | if (lopt_size > PAGE_SIZE) | 47 | if (lopt_size > PAGE_SIZE) |
| 48 | lopt = __vmalloc(lopt_size, | 48 | lopt = vzalloc(lopt_size); |
| 49 | GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO, | ||
| 50 | PAGE_KERNEL); | ||
| 51 | else | 49 | else |
| 52 | lopt = kzalloc(lopt_size, GFP_KERNEL); | 50 | lopt = kzalloc(lopt_size, GFP_KERNEL); |
| 53 | if (lopt == NULL) | 51 | if (lopt == NULL) |
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index 200eb538fbb3..0f280348e0fd 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c | |||
| @@ -365,7 +365,7 @@ static struct tnode *tnode_alloc(size_t size) | |||
| 365 | if (size <= PAGE_SIZE) | 365 | if (size <= PAGE_SIZE) |
| 366 | return kzalloc(size, GFP_KERNEL); | 366 | return kzalloc(size, GFP_KERNEL); |
| 367 | else | 367 | else |
| 368 | return __vmalloc(size, GFP_KERNEL | __GFP_ZERO, PAGE_KERNEL); | 368 | return vzalloc(size); |
| 369 | } | 369 | } |
| 370 | 370 | ||
| 371 | static void __tnode_vfree(struct work_struct *arg) | 371 | static void __tnode_vfree(struct work_struct *arg) |
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index 96bc7f9475a3..e5d1a44bcbdf 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c | |||
| @@ -569,6 +569,9 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info) | |||
| 569 | /* No need to clone since we're just using its address. */ | 569 | /* No need to clone since we're just using its address. */ |
| 570 | rt2 = rt; | 570 | rt2 = rt; |
| 571 | 571 | ||
| 572 | if (!fl.nl_u.ip4_u.saddr) | ||
| 573 | fl.nl_u.ip4_u.saddr = rt->rt_src; | ||
| 574 | |||
| 572 | err = xfrm_lookup(net, (struct dst_entry **)&rt, &fl, NULL, 0); | 575 | err = xfrm_lookup(net, (struct dst_entry **)&rt, &fl, NULL, 0); |
| 573 | switch (err) { | 576 | switch (err) { |
| 574 | case 0: | 577 | case 0: |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index b41ce0f0d514..23cc8e1ce8d4 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
| @@ -98,7 +98,11 @@ | |||
| 98 | #endif | 98 | #endif |
| 99 | 99 | ||
| 100 | #define INFINITY_LIFE_TIME 0xFFFFFFFF | 100 | #define INFINITY_LIFE_TIME 0xFFFFFFFF |
| 101 | #define TIME_DELTA(a, b) ((unsigned long)((long)(a) - (long)(b))) | 101 | |
| 102 | static inline u32 cstamp_delta(unsigned long cstamp) | ||
| 103 | { | ||
| 104 | return (cstamp - INITIAL_JIFFIES) * 100UL / HZ; | ||
| 105 | } | ||
| 102 | 106 | ||
| 103 | #define ADDRCONF_TIMER_FUZZ_MINUS (HZ > 50 ? HZ/50 : 1) | 107 | #define ADDRCONF_TIMER_FUZZ_MINUS (HZ > 50 ? HZ/50 : 1) |
| 104 | #define ADDRCONF_TIMER_FUZZ (HZ / 4) | 108 | #define ADDRCONF_TIMER_FUZZ (HZ / 4) |
| @@ -2754,13 +2758,13 @@ static int addrconf_ifdown(struct net_device *dev, int how) | |||
| 2754 | ifa->state = INET6_IFADDR_STATE_DEAD; | 2758 | ifa->state = INET6_IFADDR_STATE_DEAD; |
| 2755 | spin_unlock_bh(&ifa->state_lock); | 2759 | spin_unlock_bh(&ifa->state_lock); |
| 2756 | 2760 | ||
| 2757 | if (state == INET6_IFADDR_STATE_DEAD) { | 2761 | if (state != INET6_IFADDR_STATE_DEAD) { |
| 2758 | in6_ifa_put(ifa); | ||
| 2759 | } else { | ||
| 2760 | __ipv6_ifa_notify(RTM_DELADDR, ifa); | 2762 | __ipv6_ifa_notify(RTM_DELADDR, ifa); |
| 2761 | atomic_notifier_call_chain(&inet6addr_chain, | 2763 | atomic_notifier_call_chain(&inet6addr_chain, |
| 2762 | NETDEV_DOWN, ifa); | 2764 | NETDEV_DOWN, ifa); |
| 2763 | } | 2765 | } |
| 2766 | |||
| 2767 | in6_ifa_put(ifa); | ||
| 2764 | write_lock_bh(&idev->lock); | 2768 | write_lock_bh(&idev->lock); |
| 2765 | } | 2769 | } |
| 2766 | } | 2770 | } |
| @@ -3444,10 +3448,8 @@ static int put_cacheinfo(struct sk_buff *skb, unsigned long cstamp, | |||
| 3444 | { | 3448 | { |
| 3445 | struct ifa_cacheinfo ci; | 3449 | struct ifa_cacheinfo ci; |
| 3446 | 3450 | ||
| 3447 | ci.cstamp = (u32)(TIME_DELTA(cstamp, INITIAL_JIFFIES) / HZ * 100 | 3451 | ci.cstamp = cstamp_delta(cstamp); |
| 3448 | + TIME_DELTA(cstamp, INITIAL_JIFFIES) % HZ * 100 / HZ); | 3452 | ci.tstamp = cstamp_delta(tstamp); |
| 3449 | ci.tstamp = (u32)(TIME_DELTA(tstamp, INITIAL_JIFFIES) / HZ * 100 | ||
| 3450 | + TIME_DELTA(tstamp, INITIAL_JIFFIES) % HZ * 100 / HZ); | ||
| 3451 | ci.ifa_prefered = preferred; | 3453 | ci.ifa_prefered = preferred; |
| 3452 | ci.ifa_valid = valid; | 3454 | ci.ifa_valid = valid; |
| 3453 | 3455 | ||
| @@ -3798,8 +3800,10 @@ static inline void ipv6_store_devconf(struct ipv6_devconf *cnf, | |||
| 3798 | array[DEVCONF_AUTOCONF] = cnf->autoconf; | 3800 | array[DEVCONF_AUTOCONF] = cnf->autoconf; |
| 3799 | array[DEVCONF_DAD_TRANSMITS] = cnf->dad_transmits; | 3801 | array[DEVCONF_DAD_TRANSMITS] = cnf->dad_transmits; |
| 3800 | array[DEVCONF_RTR_SOLICITS] = cnf->rtr_solicits; | 3802 | array[DEVCONF_RTR_SOLICITS] = cnf->rtr_solicits; |
| 3801 | array[DEVCONF_RTR_SOLICIT_INTERVAL] = cnf->rtr_solicit_interval; | 3803 | array[DEVCONF_RTR_SOLICIT_INTERVAL] = |
| 3802 | array[DEVCONF_RTR_SOLICIT_DELAY] = cnf->rtr_solicit_delay; | 3804 | jiffies_to_msecs(cnf->rtr_solicit_interval); |
| 3805 | array[DEVCONF_RTR_SOLICIT_DELAY] = | ||
| 3806 | jiffies_to_msecs(cnf->rtr_solicit_delay); | ||
| 3803 | array[DEVCONF_FORCE_MLD_VERSION] = cnf->force_mld_version; | 3807 | array[DEVCONF_FORCE_MLD_VERSION] = cnf->force_mld_version; |
| 3804 | #ifdef CONFIG_IPV6_PRIVACY | 3808 | #ifdef CONFIG_IPV6_PRIVACY |
| 3805 | array[DEVCONF_USE_TEMPADDR] = cnf->use_tempaddr; | 3809 | array[DEVCONF_USE_TEMPADDR] = cnf->use_tempaddr; |
| @@ -3813,7 +3817,8 @@ static inline void ipv6_store_devconf(struct ipv6_devconf *cnf, | |||
| 3813 | array[DEVCONF_ACCEPT_RA_PINFO] = cnf->accept_ra_pinfo; | 3817 | array[DEVCONF_ACCEPT_RA_PINFO] = cnf->accept_ra_pinfo; |
| 3814 | #ifdef CONFIG_IPV6_ROUTER_PREF | 3818 | #ifdef CONFIG_IPV6_ROUTER_PREF |
| 3815 | array[DEVCONF_ACCEPT_RA_RTR_PREF] = cnf->accept_ra_rtr_pref; | 3819 | array[DEVCONF_ACCEPT_RA_RTR_PREF] = cnf->accept_ra_rtr_pref; |
| 3816 | array[DEVCONF_RTR_PROBE_INTERVAL] = cnf->rtr_probe_interval; | 3820 | array[DEVCONF_RTR_PROBE_INTERVAL] = |
| 3821 | jiffies_to_msecs(cnf->rtr_probe_interval); | ||
| 3817 | #ifdef CONFIG_IPV6_ROUTE_INFO | 3822 | #ifdef CONFIG_IPV6_ROUTE_INFO |
| 3818 | array[DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN] = cnf->accept_ra_rt_info_max_plen; | 3823 | array[DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN] = cnf->accept_ra_rt_info_max_plen; |
| 3819 | #endif | 3824 | #endif |
| @@ -3929,10 +3934,9 @@ static int inet6_fill_ifinfo(struct sk_buff *skb, struct inet6_dev *idev, | |||
| 3929 | NLA_PUT_U32(skb, IFLA_INET6_FLAGS, idev->if_flags); | 3934 | NLA_PUT_U32(skb, IFLA_INET6_FLAGS, idev->if_flags); |
| 3930 | 3935 | ||
| 3931 | ci.max_reasm_len = IPV6_MAXPLEN; | 3936 | ci.max_reasm_len = IPV6_MAXPLEN; |
| 3932 | ci.tstamp = (__u32)(TIME_DELTA(idev->tstamp, INITIAL_JIFFIES) / HZ * 100 | 3937 | ci.tstamp = cstamp_delta(idev->tstamp); |
| 3933 | + TIME_DELTA(idev->tstamp, INITIAL_JIFFIES) % HZ * 100 / HZ); | 3938 | ci.reachable_time = jiffies_to_msecs(idev->nd_parms->reachable_time); |
| 3934 | ci.reachable_time = idev->nd_parms->reachable_time; | 3939 | ci.retrans_time = jiffies_to_msecs(idev->nd_parms->retrans_time); |
| 3935 | ci.retrans_time = idev->nd_parms->retrans_time; | ||
| 3936 | NLA_PUT(skb, IFLA_INET6_CACHEINFO, sizeof(ci), &ci); | 3940 | NLA_PUT(skb, IFLA_INET6_CACHEINFO, sizeof(ci), &ci); |
| 3937 | 3941 | ||
| 3938 | nla = nla_reserve(skb, IFLA_INET6_CONF, DEVCONF_MAX * sizeof(s32)); | 3942 | nla = nla_reserve(skb, IFLA_INET6_CONF, DEVCONF_MAX * sizeof(s32)); |
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c index 7f097989cde2..a6de3059746d 100644 --- a/net/irda/af_irda.c +++ b/net/irda/af_irda.c | |||
| @@ -45,7 +45,6 @@ | |||
| 45 | #include <linux/capability.h> | 45 | #include <linux/capability.h> |
| 46 | #include <linux/module.h> | 46 | #include <linux/module.h> |
| 47 | #include <linux/types.h> | 47 | #include <linux/types.h> |
| 48 | #include <linux/smp_lock.h> | ||
| 49 | #include <linux/socket.h> | 48 | #include <linux/socket.h> |
| 50 | #include <linux/sockios.h> | 49 | #include <linux/sockios.h> |
| 51 | #include <linux/slab.h> | 50 | #include <linux/slab.h> |
diff --git a/net/irda/irnet/irnet_ppp.c b/net/irda/irnet/irnet_ppp.c index 7fa86373de41..7c567b8aa89a 100644 --- a/net/irda/irnet/irnet_ppp.c +++ b/net/irda/irnet/irnet_ppp.c | |||
| @@ -15,7 +15,6 @@ | |||
| 15 | 15 | ||
| 16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
| 17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
| 18 | #include <linux/smp_lock.h> | ||
| 19 | #include "irnet_ppp.h" /* Private header */ | 18 | #include "irnet_ppp.h" /* Private header */ |
| 20 | /* Please put other headers in irnet.h - Thanks */ | 19 | /* Please put other headers in irnet.h - Thanks */ |
| 21 | 20 | ||
diff --git a/net/irda/irttp.c b/net/irda/irttp.c index 285761e77d90..f6054f9ccbe3 100644 --- a/net/irda/irttp.c +++ b/net/irda/irttp.c | |||
| @@ -550,22 +550,30 @@ EXPORT_SYMBOL(irttp_close_tsap); | |||
| 550 | */ | 550 | */ |
| 551 | int irttp_udata_request(struct tsap_cb *self, struct sk_buff *skb) | 551 | int irttp_udata_request(struct tsap_cb *self, struct sk_buff *skb) |
| 552 | { | 552 | { |
| 553 | int ret; | ||
| 554 | |||
| 553 | IRDA_ASSERT(self != NULL, return -1;); | 555 | IRDA_ASSERT(self != NULL, return -1;); |
| 554 | IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); | 556 | IRDA_ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); |
| 555 | IRDA_ASSERT(skb != NULL, return -1;); | 557 | IRDA_ASSERT(skb != NULL, return -1;); |
| 556 | 558 | ||
| 557 | IRDA_DEBUG(4, "%s()\n", __func__); | 559 | IRDA_DEBUG(4, "%s()\n", __func__); |
| 558 | 560 | ||
| 561 | /* Take shortcut on zero byte packets */ | ||
| 562 | if (skb->len == 0) { | ||
| 563 | ret = 0; | ||
| 564 | goto err; | ||
| 565 | } | ||
| 566 | |||
| 559 | /* Check that nothing bad happens */ | 567 | /* Check that nothing bad happens */ |
| 560 | if ((skb->len == 0) || (!self->connected)) { | 568 | if (!self->connected) { |
| 561 | IRDA_DEBUG(1, "%s(), No data, or not connected\n", | 569 | IRDA_WARNING("%s(), Not connected\n", __func__); |
| 562 | __func__); | 570 | ret = -ENOTCONN; |
| 563 | goto err; | 571 | goto err; |
| 564 | } | 572 | } |
| 565 | 573 | ||
| 566 | if (skb->len > self->max_seg_size) { | 574 | if (skb->len > self->max_seg_size) { |
| 567 | IRDA_DEBUG(1, "%s(), UData is too large for IrLAP!\n", | 575 | IRDA_ERROR("%s(), UData is too large for IrLAP!\n", __func__); |
| 568 | __func__); | 576 | ret = -EMSGSIZE; |
| 569 | goto err; | 577 | goto err; |
| 570 | } | 578 | } |
| 571 | 579 | ||
| @@ -576,7 +584,7 @@ int irttp_udata_request(struct tsap_cb *self, struct sk_buff *skb) | |||
| 576 | 584 | ||
| 577 | err: | 585 | err: |
| 578 | dev_kfree_skb(skb); | 586 | dev_kfree_skb(skb); |
| 579 | return -1; | 587 | return ret; |
| 580 | } | 588 | } |
| 581 | EXPORT_SYMBOL(irttp_udata_request); | 589 | EXPORT_SYMBOL(irttp_udata_request); |
| 582 | 590 | ||
| @@ -599,9 +607,15 @@ int irttp_data_request(struct tsap_cb *self, struct sk_buff *skb) | |||
| 599 | IRDA_DEBUG(2, "%s() : queue len = %d\n", __func__, | 607 | IRDA_DEBUG(2, "%s() : queue len = %d\n", __func__, |
| 600 | skb_queue_len(&self->tx_queue)); | 608 | skb_queue_len(&self->tx_queue)); |
| 601 | 609 | ||
| 610 | /* Take shortcut on zero byte packets */ | ||
| 611 | if (skb->len == 0) { | ||
| 612 | ret = 0; | ||
| 613 | goto err; | ||
| 614 | } | ||
| 615 | |||
| 602 | /* Check that nothing bad happens */ | 616 | /* Check that nothing bad happens */ |
| 603 | if ((skb->len == 0) || (!self->connected)) { | 617 | if (!self->connected) { |
| 604 | IRDA_WARNING("%s: No data, or not connected\n", __func__); | 618 | IRDA_WARNING("%s: Not connected\n", __func__); |
| 605 | ret = -ENOTCONN; | 619 | ret = -ENOTCONN; |
| 606 | goto err; | 620 | goto err; |
| 607 | } | 621 | } |
diff --git a/net/netfilter/ipvs/Kconfig b/net/netfilter/ipvs/Kconfig index a22dac227055..70bd1d0774c6 100644 --- a/net/netfilter/ipvs/Kconfig +++ b/net/netfilter/ipvs/Kconfig | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | menuconfig IP_VS | 4 | menuconfig IP_VS |
| 5 | tristate "IP virtual server support" | 5 | tristate "IP virtual server support" |
| 6 | depends on NET && INET && NETFILTER | 6 | depends on NET && INET && NETFILTER |
| 7 | depends on (NF_CONNTRACK || NF_CONNTRACK=n) | ||
| 7 | ---help--- | 8 | ---help--- |
| 8 | IP Virtual Server support will let you build a high-performance | 9 | IP Virtual Server support will let you build a high-performance |
| 9 | virtual server based on cluster of two or more real servers. This | 10 | virtual server based on cluster of two or more real servers. This |
diff --git a/net/rds/rdma.c b/net/rds/rdma.c index 8920f2a83327..4e37c1cbe8b2 100644 --- a/net/rds/rdma.c +++ b/net/rds/rdma.c | |||
| @@ -567,7 +567,7 @@ int rds_cmsg_rdma_args(struct rds_sock *rs, struct rds_message *rm, | |||
| 567 | goto out; | 567 | goto out; |
| 568 | } | 568 | } |
| 569 | 569 | ||
| 570 | if (args->nr_local > (u64)UINT_MAX) { | 570 | if (args->nr_local > UIO_MAXIOV) { |
| 571 | ret = -EMSGSIZE; | 571 | ret = -EMSGSIZE; |
| 572 | goto out; | 572 | goto out; |
| 573 | } | 573 | } |
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 9dab9573be41..92ce94f5146b 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
| @@ -989,20 +989,26 @@ call_refreshresult(struct rpc_task *task) | |||
| 989 | dprint_status(task); | 989 | dprint_status(task); |
| 990 | 990 | ||
| 991 | task->tk_status = 0; | 991 | task->tk_status = 0; |
| 992 | task->tk_action = call_allocate; | 992 | task->tk_action = call_refresh; |
| 993 | if (status >= 0 && rpcauth_uptodatecred(task)) | ||
| 994 | return; | ||
| 995 | switch (status) { | 993 | switch (status) { |
| 996 | case -EACCES: | 994 | case 0: |
| 997 | rpc_exit(task, -EACCES); | 995 | if (rpcauth_uptodatecred(task)) |
| 998 | return; | 996 | task->tk_action = call_allocate; |
| 999 | case -ENOMEM: | ||
| 1000 | rpc_exit(task, -ENOMEM); | ||
| 1001 | return; | 997 | return; |
| 1002 | case -ETIMEDOUT: | 998 | case -ETIMEDOUT: |
| 1003 | rpc_delay(task, 3*HZ); | 999 | rpc_delay(task, 3*HZ); |
| 1000 | case -EAGAIN: | ||
| 1001 | status = -EACCES; | ||
| 1002 | if (!task->tk_cred_retry) | ||
| 1003 | break; | ||
| 1004 | task->tk_cred_retry--; | ||
| 1005 | dprintk("RPC: %5u %s: retry refresh creds\n", | ||
| 1006 | task->tk_pid, __func__); | ||
| 1007 | return; | ||
| 1004 | } | 1008 | } |
| 1005 | task->tk_action = call_refresh; | 1009 | dprintk("RPC: %5u %s: refresh creds failed with error %d\n", |
| 1010 | task->tk_pid, __func__, status); | ||
| 1011 | rpc_exit(task, status); | ||
| 1006 | } | 1012 | } |
| 1007 | 1013 | ||
| 1008 | /* | 1014 | /* |
diff --git a/net/sunrpc/stats.c b/net/sunrpc/stats.c index f71a73107ae9..80df89d957ba 100644 --- a/net/sunrpc/stats.c +++ b/net/sunrpc/stats.c | |||
| @@ -115,9 +115,7 @@ EXPORT_SYMBOL_GPL(svc_seq_show); | |||
| 115 | */ | 115 | */ |
| 116 | struct rpc_iostats *rpc_alloc_iostats(struct rpc_clnt *clnt) | 116 | struct rpc_iostats *rpc_alloc_iostats(struct rpc_clnt *clnt) |
| 117 | { | 117 | { |
| 118 | struct rpc_iostats *new; | 118 | return kcalloc(clnt->cl_maxproc, sizeof(struct rpc_iostats), GFP_KERNEL); |
| 119 | new = kcalloc(clnt->cl_maxproc, sizeof(struct rpc_iostats), GFP_KERNEL); | ||
| 120 | return new; | ||
| 121 | } | 119 | } |
| 122 | EXPORT_SYMBOL_GPL(rpc_alloc_iostats); | 120 | EXPORT_SYMBOL_GPL(rpc_alloc_iostats); |
| 123 | 121 | ||
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index c82fe739fbdc..ea2ff78dcf7b 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c | |||
| @@ -5,7 +5,6 @@ | |||
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
| 8 | #include <linux/smp_lock.h> | ||
| 9 | #include <linux/errno.h> | 8 | #include <linux/errno.h> |
| 10 | #include <linux/freezer.h> | 9 | #include <linux/freezer.h> |
| 11 | #include <linux/kthread.h> | 10 | #include <linux/kthread.h> |
diff --git a/net/wireless/chan.c b/net/wireless/chan.c index d0c92dddb26b..17cd0c04d139 100644 --- a/net/wireless/chan.c +++ b/net/wireless/chan.c | |||
| @@ -44,6 +44,38 @@ rdev_freq_to_chan(struct cfg80211_registered_device *rdev, | |||
| 44 | return chan; | 44 | return chan; |
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | static bool can_beacon_sec_chan(struct wiphy *wiphy, | ||
| 48 | struct ieee80211_channel *chan, | ||
| 49 | enum nl80211_channel_type channel_type) | ||
| 50 | { | ||
| 51 | struct ieee80211_channel *sec_chan; | ||
| 52 | int diff; | ||
| 53 | |||
| 54 | switch (channel_type) { | ||
| 55 | case NL80211_CHAN_HT40PLUS: | ||
| 56 | diff = 20; | ||
| 57 | break; | ||
| 58 | case NL80211_CHAN_HT40MINUS: | ||
| 59 | diff = -20; | ||
| 60 | break; | ||
| 61 | default: | ||
| 62 | return false; | ||
| 63 | } | ||
| 64 | |||
| 65 | sec_chan = ieee80211_get_channel(wiphy, chan->center_freq + diff); | ||
| 66 | if (!sec_chan) | ||
| 67 | return false; | ||
| 68 | |||
| 69 | /* we'll need a DFS capability later */ | ||
| 70 | if (sec_chan->flags & (IEEE80211_CHAN_DISABLED | | ||
| 71 | IEEE80211_CHAN_PASSIVE_SCAN | | ||
| 72 | IEEE80211_CHAN_NO_IBSS | | ||
| 73 | IEEE80211_CHAN_RADAR)) | ||
| 74 | return false; | ||
| 75 | |||
| 76 | return true; | ||
| 77 | } | ||
| 78 | |||
| 47 | int cfg80211_set_freq(struct cfg80211_registered_device *rdev, | 79 | int cfg80211_set_freq(struct cfg80211_registered_device *rdev, |
| 48 | struct wireless_dev *wdev, int freq, | 80 | struct wireless_dev *wdev, int freq, |
| 49 | enum nl80211_channel_type channel_type) | 81 | enum nl80211_channel_type channel_type) |
| @@ -68,6 +100,28 @@ int cfg80211_set_freq(struct cfg80211_registered_device *rdev, | |||
| 68 | if (!chan) | 100 | if (!chan) |
| 69 | return -EINVAL; | 101 | return -EINVAL; |
| 70 | 102 | ||
| 103 | /* Both channels should be able to initiate communication */ | ||
| 104 | if (wdev && (wdev->iftype == NL80211_IFTYPE_ADHOC || | ||
| 105 | wdev->iftype == NL80211_IFTYPE_AP || | ||
| 106 | wdev->iftype == NL80211_IFTYPE_AP_VLAN || | ||
| 107 | wdev->iftype == NL80211_IFTYPE_MESH_POINT || | ||
| 108 | wdev->iftype == NL80211_IFTYPE_P2P_GO)) { | ||
| 109 | switch (channel_type) { | ||
| 110 | case NL80211_CHAN_HT40PLUS: | ||
| 111 | case NL80211_CHAN_HT40MINUS: | ||
| 112 | if (!can_beacon_sec_chan(&rdev->wiphy, chan, | ||
| 113 | channel_type)) { | ||
| 114 | printk(KERN_DEBUG | ||
| 115 | "cfg80211: Secondary channel not " | ||
| 116 | "allowed to initiate communication\n"); | ||
| 117 | return -EINVAL; | ||
| 118 | } | ||
| 119 | break; | ||
| 120 | default: | ||
| 121 | break; | ||
| 122 | } | ||
| 123 | } | ||
| 124 | |||
| 71 | result = rdev->ops->set_channel(&rdev->wiphy, | 125 | result = rdev->ops->set_channel(&rdev->wiphy, |
| 72 | wdev ? wdev->netdev : NULL, | 126 | wdev ? wdev->netdev : NULL, |
| 73 | chan, channel_type); | 127 | chan, channel_type); |
diff --git a/net/xfrm/xfrm_hash.c b/net/xfrm/xfrm_hash.c index a2023ec52329..1e98bc0fe0a5 100644 --- a/net/xfrm/xfrm_hash.c +++ b/net/xfrm/xfrm_hash.c | |||
| @@ -19,7 +19,7 @@ struct hlist_head *xfrm_hash_alloc(unsigned int sz) | |||
| 19 | if (sz <= PAGE_SIZE) | 19 | if (sz <= PAGE_SIZE) |
| 20 | n = kzalloc(sz, GFP_KERNEL); | 20 | n = kzalloc(sz, GFP_KERNEL); |
| 21 | else if (hashdist) | 21 | else if (hashdist) |
| 22 | n = __vmalloc(sz, GFP_KERNEL | __GFP_ZERO, PAGE_KERNEL); | 22 | n = vzalloc(sz); |
| 23 | else | 23 | else |
| 24 | n = (struct hlist_head *) | 24 | n = (struct hlist_head *) |
| 25 | __get_free_pages(GFP_KERNEL | __GFP_NOWARN | __GFP_ZERO, | 25 | __get_free_pages(GFP_KERNEL | __GFP_NOWARN | __GFP_ZERO, |
