diff options
Diffstat (limited to 'net')
| -rw-r--r-- | net/8021q/vlan_core.c | 9 | ||||
| -rw-r--r-- | net/ipv6/addrconf.c | 15 | ||||
| -rw-r--r-- | net/irda/ircomm/ircomm_tty.c | 2 | ||||
| -rw-r--r-- | net/sctp/sm_sideeffect.c | 3 | ||||
| -rw-r--r-- | net/sunrpc/cache.c | 4 |
5 files changed, 23 insertions, 10 deletions
diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c index fbbf1fa00940..65e06abe023f 100644 --- a/net/8021q/vlan_core.c +++ b/net/8021q/vlan_core.c | |||
| @@ -366,6 +366,13 @@ EXPORT_SYMBOL(vlan_vids_del_by_dev); | |||
| 366 | 366 | ||
| 367 | bool vlan_uses_dev(const struct net_device *dev) | 367 | bool vlan_uses_dev(const struct net_device *dev) |
| 368 | { | 368 | { |
| 369 | return rtnl_dereference(dev->vlan_info) ? true : false; | 369 | struct vlan_info *vlan_info; |
| 370 | |||
| 371 | ASSERT_RTNL(); | ||
| 372 | |||
| 373 | vlan_info = rtnl_dereference(dev->vlan_info); | ||
| 374 | if (!vlan_info) | ||
| 375 | return false; | ||
| 376 | return vlan_info->grp.nr_vlan_devs ? true : false; | ||
| 370 | } | 377 | } |
| 371 | EXPORT_SYMBOL(vlan_uses_dev); | 378 | EXPORT_SYMBOL(vlan_uses_dev); |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index d7c56f8a5b4e..0424e4e27414 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
| @@ -3064,14 +3064,15 @@ static struct inet6_ifaddr *if6_get_first(struct seq_file *seq, loff_t pos) | |||
| 3064 | struct hlist_node *n; | 3064 | struct hlist_node *n; |
| 3065 | hlist_for_each_entry_rcu_bh(ifa, n, &inet6_addr_lst[state->bucket], | 3065 | hlist_for_each_entry_rcu_bh(ifa, n, &inet6_addr_lst[state->bucket], |
| 3066 | addr_lst) { | 3066 | addr_lst) { |
| 3067 | if (!net_eq(dev_net(ifa->idev->dev), net)) | ||
| 3068 | continue; | ||
| 3067 | /* sync with offset */ | 3069 | /* sync with offset */ |
| 3068 | if (p < state->offset) { | 3070 | if (p < state->offset) { |
| 3069 | p++; | 3071 | p++; |
| 3070 | continue; | 3072 | continue; |
| 3071 | } | 3073 | } |
| 3072 | state->offset++; | 3074 | state->offset++; |
| 3073 | if (net_eq(dev_net(ifa->idev->dev), net)) | 3075 | return ifa; |
| 3074 | return ifa; | ||
| 3075 | } | 3076 | } |
| 3076 | 3077 | ||
| 3077 | /* prepare for next bucket */ | 3078 | /* prepare for next bucket */ |
| @@ -3089,18 +3090,20 @@ static struct inet6_ifaddr *if6_get_next(struct seq_file *seq, | |||
| 3089 | struct hlist_node *n = &ifa->addr_lst; | 3090 | struct hlist_node *n = &ifa->addr_lst; |
| 3090 | 3091 | ||
| 3091 | hlist_for_each_entry_continue_rcu_bh(ifa, n, addr_lst) { | 3092 | hlist_for_each_entry_continue_rcu_bh(ifa, n, addr_lst) { |
| 3093 | if (!net_eq(dev_net(ifa->idev->dev), net)) | ||
| 3094 | continue; | ||
| 3092 | state->offset++; | 3095 | state->offset++; |
| 3093 | if (net_eq(dev_net(ifa->idev->dev), net)) | 3096 | return ifa; |
| 3094 | return ifa; | ||
| 3095 | } | 3097 | } |
| 3096 | 3098 | ||
| 3097 | while (++state->bucket < IN6_ADDR_HSIZE) { | 3099 | while (++state->bucket < IN6_ADDR_HSIZE) { |
| 3098 | state->offset = 0; | 3100 | state->offset = 0; |
| 3099 | hlist_for_each_entry_rcu_bh(ifa, n, | 3101 | hlist_for_each_entry_rcu_bh(ifa, n, |
| 3100 | &inet6_addr_lst[state->bucket], addr_lst) { | 3102 | &inet6_addr_lst[state->bucket], addr_lst) { |
| 3103 | if (!net_eq(dev_net(ifa->idev->dev), net)) | ||
| 3104 | continue; | ||
| 3101 | state->offset++; | 3105 | state->offset++; |
| 3102 | if (net_eq(dev_net(ifa->idev->dev), net)) | 3106 | return ifa; |
| 3103 | return ifa; | ||
| 3104 | } | 3107 | } |
| 3105 | } | 3108 | } |
| 3106 | 3109 | ||
diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c index 95a3a7a336ba..496ce2cebcd7 100644 --- a/net/irda/ircomm/ircomm_tty.c +++ b/net/irda/ircomm/ircomm_tty.c | |||
| @@ -421,6 +421,8 @@ static int ircomm_tty_install(struct tty_driver *driver, struct tty_struct *tty) | |||
| 421 | hashbin_insert(ircomm_tty, (irda_queue_t *) self, line, NULL); | 421 | hashbin_insert(ircomm_tty, (irda_queue_t *) self, line, NULL); |
| 422 | } | 422 | } |
| 423 | 423 | ||
| 424 | tty->driver_data = self; | ||
| 425 | |||
| 424 | return tty_port_install(&self->port, driver, tty); | 426 | return tty_port_install(&self->port, driver, tty); |
| 425 | } | 427 | } |
| 426 | 428 | ||
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c index 57f7de839b03..6773d7803627 100644 --- a/net/sctp/sm_sideeffect.c +++ b/net/sctp/sm_sideeffect.c | |||
| @@ -1642,8 +1642,9 @@ static int sctp_cmd_interpreter(sctp_event_t event_type, | |||
| 1642 | asoc->outqueue.outstanding_bytes; | 1642 | asoc->outqueue.outstanding_bytes; |
| 1643 | sackh.num_gap_ack_blocks = 0; | 1643 | sackh.num_gap_ack_blocks = 0; |
| 1644 | sackh.num_dup_tsns = 0; | 1644 | sackh.num_dup_tsns = 0; |
| 1645 | chunk->subh.sack_hdr = &sackh; | ||
| 1645 | sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_SACK, | 1646 | sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_SACK, |
| 1646 | SCTP_SACKH(&sackh)); | 1647 | SCTP_CHUNK(chunk)); |
| 1647 | break; | 1648 | break; |
| 1648 | 1649 | ||
| 1649 | case SCTP_CMD_DISCARD_PACKET: | 1650 | case SCTP_CMD_DISCARD_PACKET: |
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index 2a68bb3db772..fc2f7aa4dca7 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c | |||
| @@ -1409,11 +1409,11 @@ static ssize_t read_flush(struct file *file, char __user *buf, | |||
| 1409 | size_t count, loff_t *ppos, | 1409 | size_t count, loff_t *ppos, |
| 1410 | struct cache_detail *cd) | 1410 | struct cache_detail *cd) |
| 1411 | { | 1411 | { |
| 1412 | char tbuf[20]; | 1412 | char tbuf[22]; |
| 1413 | unsigned long p = *ppos; | 1413 | unsigned long p = *ppos; |
| 1414 | size_t len; | 1414 | size_t len; |
| 1415 | 1415 | ||
| 1416 | sprintf(tbuf, "%lu\n", convert_to_wallclock(cd->flush_time)); | 1416 | snprintf(tbuf, sizeof(tbuf), "%lu\n", convert_to_wallclock(cd->flush_time)); |
| 1417 | len = strlen(tbuf); | 1417 | len = strlen(tbuf); |
| 1418 | if (p >= len) | 1418 | if (p >= len) |
| 1419 | return 0; | 1419 | return 0; |
