Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
[ICMP]: Fix icmp_errors_use_inbound_ifaddr sysctl
[IPV4]: Fix "ipOutNoRoutes" counter error for TCP and UDP
[NET] gso: Fix GSO feature mask in sk_setup_caps
[TCP]: Fix GSO ignorance of pkts_acked arg (cong.cntrl modules)
[NET]: Fix comparisons of unsigned < 0.
[NET]: Make net watchdog timers 1 sec jiffy aligned.
[ATM]: Fix warning.
[TCP]: Use default 32768-61000 outgoing port range in all cases.
[AF_UNIX]: Fix datagram connect race causing an OOPS.
[TG3]: Fix link problem on Dell's onboard 5906.
[AF_UNIX]: Make socket locking much less confusing.

+132 -96
+11 -4
drivers/atm/firestream.c
··· 1475 1475 struct FS_BPENTRY *qe, *ne; 1476 1476 struct sk_buff *skb; 1477 1477 int n = 0; 1478 + u32 qe_tmp; 1478 1479 1479 1480 fs_dprintk (FS_DEBUG_QUEUE, "Topping off queue at %x (%d-%d/%d)\n", 1480 1481 fp->offset, read_fs (dev, FP_CNT (fp->offset)), fp->n, ··· 1503 1502 ne->skb = skb; 1504 1503 ne->fp = fp; 1505 1504 1506 - qe = (struct FS_BPENTRY *) (read_fs (dev, FP_EA(fp->offset))); 1507 - fs_dprintk (FS_DEBUG_QUEUE, "link at %p\n", qe); 1508 - if (qe) { 1509 - qe = bus_to_virt ((long) qe); 1505 + /* 1506 + * FIXME: following code encodes and decodes 1507 + * machine pointers (could be 64-bit) into a 1508 + * 32-bit register. 1509 + */ 1510 + 1511 + qe_tmp = read_fs (dev, FP_EA(fp->offset)); 1512 + fs_dprintk (FS_DEBUG_QUEUE, "link at %x\n", qe_tmp); 1513 + if (qe_tmp) { 1514 + qe = bus_to_virt ((long) qe_tmp); 1510 1515 qe->next = virt_to_bus(ne); 1511 1516 qe->flags &= ~FP_FLAGS_EPI; 1512 1517 } else
+3 -2
drivers/net/tg3.c
··· 64 64 65 65 #define DRV_MODULE_NAME "tg3" 66 66 #define PFX DRV_MODULE_NAME ": " 67 - #define DRV_MODULE_VERSION "3.76" 68 - #define DRV_MODULE_RELDATE "May 5, 2007" 67 + #define DRV_MODULE_VERSION "3.77" 68 + #define DRV_MODULE_RELDATE "May 31, 2007" 69 69 70 70 #define TG3_DEF_MAC_MODE 0 71 71 #define TG3_DEF_RX_MODE 0 ··· 10961 10961 * upon subsystem IDs. 10962 10962 */ 10963 10963 if (tp->pdev->subsystem_vendor == PCI_VENDOR_ID_DELL && 10964 + GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701 && 10964 10965 !(tp->tg3_flags2 & TG3_FLG2_PHY_SERDES)) { 10965 10966 tp->tg3_flags |= (TG3_FLAG_USE_MI_INTERRUPT | 10966 10967 TG3_FLAG_USE_LINKCHG_REG);
+3 -5
include/net/af_unix.h
··· 62 62 #define UNIXCREDS(skb) (&UNIXCB((skb)).creds) 63 63 #define UNIXSID(skb) (&UNIXCB((skb)).secid) 64 64 65 - #define unix_state_rlock(s) spin_lock(&unix_sk(s)->lock) 66 - #define unix_state_runlock(s) spin_unlock(&unix_sk(s)->lock) 67 - #define unix_state_wlock(s) spin_lock(&unix_sk(s)->lock) 68 - #define unix_state_wlock_nested(s) \ 65 + #define unix_state_lock(s) spin_lock(&unix_sk(s)->lock) 66 + #define unix_state_unlock(s) spin_unlock(&unix_sk(s)->lock) 67 + #define unix_state_lock_nested(s) \ 69 68 spin_lock_nested(&unix_sk(s)->lock, \ 70 69 SINGLE_DEPTH_NESTING) 71 - #define unix_state_wunlock(s) spin_unlock(&unix_sk(s)->lock) 72 70 73 71 #ifdef __KERNEL__ 74 72 /* The AF_UNIX socket */
+1 -2
net/8021q/vlan.c
··· 736 736 case SET_VLAN_NAME_TYPE_CMD: 737 737 if (!capable(CAP_NET_ADMIN)) 738 738 return -EPERM; 739 - if ((args.u.name_type >= 0) && 740 - (args.u.name_type < VLAN_NAME_TYPE_HIGHEST)) { 739 + if (args.u.name_type < VLAN_NAME_TYPE_HIGHEST) { 741 740 vlan_name_type = args.u.name_type; 742 741 err = 0; 743 742 } else {
+1 -1
net/core/sock.c
··· 998 998 __sk_dst_set(sk, dst); 999 999 sk->sk_route_caps = dst->dev->features; 1000 1000 if (sk->sk_route_caps & NETIF_F_GSO) 1001 - sk->sk_route_caps |= NETIF_F_GSO_MASK; 1001 + sk->sk_route_caps |= NETIF_F_GSO_SOFTWARE; 1002 1002 if (sk_can_gso(sk)) { 1003 1003 if (dst->header_len) 1004 1004 sk->sk_route_caps &= ~NETIF_F_GSO_MASK;
+1 -1
net/dccp/probe.c
··· 128 128 int error = 0, cnt = 0; 129 129 unsigned char *tbuf; 130 130 131 - if (!buf || len < 0) 131 + if (!buf) 132 132 return -EINVAL; 133 133 134 134 if (len == 0)
+5 -1
net/ipv4/datagram.c
··· 50 50 RT_CONN_FLAGS(sk), oif, 51 51 sk->sk_protocol, 52 52 inet->sport, usin->sin_port, sk, 1); 53 - if (err) 53 + if (err) { 54 + if (err == -ENETUNREACH) 55 + IP_INC_STATS_BH(IPSTATS_MIB_OUTNOROUTES); 54 56 return err; 57 + } 58 + 55 59 if ((rt->rt_flags & RTCF_BROADCAST) && !sock_flag(sk, SOCK_BROADCAST)) { 56 60 ip_rt_put(rt); 57 61 return -EACCES;
+9 -6
net/ipv4/icmp.c
··· 514 514 515 515 saddr = iph->daddr; 516 516 if (!(rt->rt_flags & RTCF_LOCAL)) { 517 - /* This is broken, skb_in->dev points to the outgoing device 518 - * after the packet passes through ip_output(). 519 - */ 520 - if (skb_in->dev && sysctl_icmp_errors_use_inbound_ifaddr) 521 - saddr = inet_select_addr(skb_in->dev, 0, RT_SCOPE_LINK); 522 - else 517 + struct net_device *dev = NULL; 518 + 519 + if (rt->fl.iif && sysctl_icmp_errors_use_inbound_ifaddr) 520 + dev = dev_get_by_index(rt->fl.iif); 521 + 522 + if (dev) { 523 + saddr = inet_select_addr(dev, 0, RT_SCOPE_LINK); 524 + dev_put(dev); 525 + } else 523 526 saddr = 0; 524 527 } 525 528
+1 -3
net/ipv4/inet_connection_sock.c
··· 31 31 32 32 /* 33 33 * This array holds the first and last local port number. 34 - * For high-usage systems, use sysctl to change this to 35 - * 32768-61000 36 34 */ 37 - int sysctl_local_port_range[2] = { 1024, 4999 }; 35 + int sysctl_local_port_range[2] = { 32768, 61000 }; 38 36 39 37 int inet_csk_bind_conflict(const struct sock *sk, 40 38 const struct inet_bind_bucket *tb)
-3
net/ipv4/tcp.c
··· 2464 2464 order++) 2465 2465 ; 2466 2466 if (order >= 4) { 2467 - sysctl_local_port_range[0] = 32768; 2468 - sysctl_local_port_range[1] = 61000; 2469 2467 tcp_death_row.sysctl_max_tw_buckets = 180000; 2470 2468 sysctl_tcp_max_orphans = 4096 << (order - 4); 2471 2469 sysctl_max_syn_backlog = 1024; 2472 2470 } else if (order < 3) { 2473 - sysctl_local_port_range[0] = 1024 * (3 - order); 2474 2471 tcp_death_row.sysctl_max_tw_buckets >>= (3 - order); 2475 2472 sysctl_tcp_max_orphans >>= (3 - order); 2476 2473 sysctl_max_syn_backlog = 128;
+2 -2
net/ipv4/tcp_input.c
··· 2407 2407 struct sk_buff *skb; 2408 2408 __u32 now = tcp_time_stamp; 2409 2409 int acked = 0; 2410 + int prior_packets = tp->packets_out; 2410 2411 __s32 seq_rtt = -1; 2411 - u32 pkts_acked = 0; 2412 2412 ktime_t last_ackt = ktime_set(0,0); 2413 2413 2414 2414 while ((skb = tcp_write_queue_head(sk)) && ··· 2437 2437 */ 2438 2438 if (!(scb->flags & TCPCB_FLAG_SYN)) { 2439 2439 acked |= FLAG_DATA_ACKED; 2440 - ++pkts_acked; 2441 2440 } else { 2442 2441 acked |= FLAG_SYN_ACKED; 2443 2442 tp->retrans_stamp = 0; ··· 2480 2481 } 2481 2482 2482 2483 if (acked&FLAG_ACKED) { 2484 + u32 pkts_acked = prior_packets - tp->packets_out; 2483 2485 const struct tcp_congestion_ops *ca_ops 2484 2486 = inet_csk(sk)->icsk_ca_ops; 2485 2487
+4 -1
net/ipv4/tcp_ipv4.c
··· 192 192 RT_CONN_FLAGS(sk), sk->sk_bound_dev_if, 193 193 IPPROTO_TCP, 194 194 inet->sport, usin->sin_port, sk, 1); 195 - if (tmp < 0) 195 + if (tmp < 0) { 196 + if (tmp == -ENETUNREACH) 197 + IP_INC_STATS_BH(IPSTATS_MIB_OUTNOROUTES); 196 198 return tmp; 199 + } 197 200 198 201 if (rt->rt_flags & (RTCF_MULTICAST | RTCF_BROADCAST)) { 199 202 ip_rt_put(rt);
+4 -1
net/ipv4/udp.c
··· 722 722 .dport = dport } } }; 723 723 security_sk_classify_flow(sk, &fl); 724 724 err = ip_route_output_flow(&rt, &fl, sk, 1); 725 - if (err) 725 + if (err) { 726 + if (err == -ENETUNREACH) 727 + IP_INC_STATS_BH(IPSTATS_MIB_OUTNOROUTES); 726 728 goto out; 729 + } 727 730 728 731 err = -EACCES; 729 732 if ((rt->rt_flags & RTCF_BROADCAST) &&
+1 -2
net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
··· 177 177 178 178 protoff = nf_ct_ipv6_skip_exthdr(*pskb, extoff, &pnum, 179 179 (*pskb)->len - extoff); 180 - if (protoff < 0 || protoff > (*pskb)->len || 181 - pnum == NEXTHDR_FRAGMENT) { 180 + if (protoff > (*pskb)->len || pnum == NEXTHDR_FRAGMENT) { 182 181 DEBUGP("proto header not found\n"); 183 182 return NF_ACCEPT; 184 183 }
+1 -2
net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
··· 168 168 skb->len - inip6off 169 169 - sizeof(struct ipv6hdr)); 170 170 171 - if ((inprotoff < 0) || (inprotoff > skb->len) || 172 - (inprotonum == NEXTHDR_FRAGMENT)) { 171 + if ((inprotoff > skb->len) || (inprotonum == NEXTHDR_FRAGMENT)) { 173 172 DEBUGP("icmpv6_error: Can't get protocol header in ICMPv6 payload.\n"); 174 173 return -NF_ACCEPT; 175 174 }
+1 -2
net/sched/act_pedit.c
··· 164 164 printk("offset must be on 32 bit boundaries\n"); 165 165 goto bad; 166 166 } 167 - if (skb->len < 0 || 168 - (offset > 0 && offset > skb->len)) { 167 + if (offset > 0 && offset > skb->len) { 169 168 printk("offset %d cant exceed pkt length %d\n", 170 169 offset, skb->len); 171 170 goto bad;
+2 -1
net/sched/sch_generic.c
··· 224 224 if (dev->tx_timeout) { 225 225 if (dev->watchdog_timeo <= 0) 226 226 dev->watchdog_timeo = 5*HZ; 227 - if (!mod_timer(&dev->watchdog_timer, jiffies + dev->watchdog_timeo)) 227 + if (!mod_timer(&dev->watchdog_timer, 228 + round_jiffies(jiffies + dev->watchdog_timeo))) 228 229 dev_hold(dev); 229 230 } 230 231 }
-8
net/sctp/debug.c
··· 77 77 /* Lookup "chunk type" debug name. */ 78 78 const char *sctp_cname(const sctp_subtype_t cid) 79 79 { 80 - if (cid.chunk < 0) 81 - return "illegal chunk id"; 82 80 if (cid.chunk <= SCTP_CID_BASE_MAX) 83 81 return sctp_cid_tbl[cid.chunk]; 84 82 ··· 144 146 /* Lookup primitive debug name. */ 145 147 const char *sctp_pname(const sctp_subtype_t id) 146 148 { 147 - if (id.primitive < 0) 148 - return "illegal primitive"; 149 149 if (id.primitive <= SCTP_EVENT_PRIMITIVE_MAX) 150 150 return sctp_primitive_tbl[id.primitive]; 151 151 return "unknown_primitive"; ··· 157 161 /* Lookup "other" debug name. */ 158 162 const char *sctp_oname(const sctp_subtype_t id) 159 163 { 160 - if (id.other < 0) 161 - return "illegal 'other' event"; 162 164 if (id.other <= SCTP_EVENT_OTHER_MAX) 163 165 return sctp_other_tbl[id.other]; 164 166 return "unknown 'other' event"; ··· 178 184 /* Lookup timer debug name. */ 179 185 const char *sctp_tname(const sctp_subtype_t id) 180 186 { 181 - if (id.timeout < 0) 182 - return "illegal 'timer' event"; 183 187 if (id.timeout <= SCTP_EVENT_TIMEOUT_MAX) 184 188 return sctp_timer_tbl[id.timeout]; 185 189 return "unknown_timer";
+1 -1
net/sctp/sm_statetable.c
··· 960 960 if (state > SCTP_STATE_MAX) 961 961 return &bug; 962 962 963 - if (cid >= 0 && cid <= SCTP_CID_BASE_MAX) 963 + if (cid <= SCTP_CID_BASE_MAX) 964 964 return &chunk_event_table[cid][state]; 965 965 966 966 if (sctp_prsctp_enable) {
+80 -47
net/unix/af_unix.c
··· 174 174 { 175 175 struct sock *peer; 176 176 177 - unix_state_rlock(s); 177 + unix_state_lock(s); 178 178 peer = unix_peer(s); 179 179 if (peer) 180 180 sock_hold(peer); 181 - unix_state_runlock(s); 181 + unix_state_unlock(s); 182 182 return peer; 183 183 } 184 184 ··· 369 369 unix_remove_socket(sk); 370 370 371 371 /* Clear state */ 372 - unix_state_wlock(sk); 372 + unix_state_lock(sk); 373 373 sock_orphan(sk); 374 374 sk->sk_shutdown = SHUTDOWN_MASK; 375 375 dentry = u->dentry; ··· 378 378 u->mnt = NULL; 379 379 state = sk->sk_state; 380 380 sk->sk_state = TCP_CLOSE; 381 - unix_state_wunlock(sk); 381 + unix_state_unlock(sk); 382 382 383 383 wake_up_interruptible_all(&u->peer_wait); 384 384 ··· 386 386 387 387 if (skpair!=NULL) { 388 388 if (sk->sk_type == SOCK_STREAM || sk->sk_type == SOCK_SEQPACKET) { 389 - unix_state_wlock(skpair); 389 + unix_state_lock(skpair); 390 390 /* No more writes */ 391 391 skpair->sk_shutdown = SHUTDOWN_MASK; 392 392 if (!skb_queue_empty(&sk->sk_receive_queue) || embrion) 393 393 skpair->sk_err = ECONNRESET; 394 - unix_state_wunlock(skpair); 394 + unix_state_unlock(skpair); 395 395 skpair->sk_state_change(skpair); 396 396 read_lock(&skpair->sk_callback_lock); 397 397 sk_wake_async(skpair,1,POLL_HUP); ··· 448 448 err = -EINVAL; 449 449 if (!u->addr) 450 450 goto out; /* No listens on an unbound socket */ 451 - unix_state_wlock(sk); 451 + unix_state_lock(sk); 452 452 if (sk->sk_state != TCP_CLOSE && sk->sk_state != TCP_LISTEN) 453 453 goto out_unlock; 454 454 if (backlog > sk->sk_max_ack_backlog) ··· 462 462 err = 0; 463 463 464 464 out_unlock: 465 - unix_state_wunlock(sk); 465 + unix_state_unlock(sk); 466 466 out: 467 467 return err; 468 468 } ··· 858 858 goto out_up; 859 859 } 860 860 861 + static void unix_state_double_lock(struct sock *sk1, struct sock *sk2) 862 + { 863 + if (unlikely(sk1 == sk2) || !sk2) { 864 + unix_state_lock(sk1); 865 + return; 866 + } 867 + if (sk1 < sk2) { 868 + unix_state_lock(sk1); 869 + unix_state_lock_nested(sk2); 870 + } else { 871 + unix_state_lock(sk2); 872 + unix_state_lock_nested(sk1); 873 + } 874 + } 875 + 876 + static void unix_state_double_unlock(struct sock *sk1, struct sock *sk2) 877 + { 878 + if (unlikely(sk1 == sk2) || !sk2) { 879 + unix_state_unlock(sk1); 880 + return; 881 + } 882 + unix_state_unlock(sk1); 883 + unix_state_unlock(sk2); 884 + } 885 + 861 886 static int unix_dgram_connect(struct socket *sock, struct sockaddr *addr, 862 887 int alen, int flags) 863 888 { ··· 902 877 !unix_sk(sk)->addr && (err = unix_autobind(sock)) != 0) 903 878 goto out; 904 879 880 + restart: 905 881 other=unix_find_other(sunaddr, alen, sock->type, hash, &err); 906 882 if (!other) 907 883 goto out; 908 884 909 - unix_state_wlock(sk); 885 + unix_state_double_lock(sk, other); 886 + 887 + /* Apparently VFS overslept socket death. Retry. */ 888 + if (sock_flag(other, SOCK_DEAD)) { 889 + unix_state_double_unlock(sk, other); 890 + sock_put(other); 891 + goto restart; 892 + } 910 893 911 894 err = -EPERM; 912 895 if (!unix_may_send(sk, other)) ··· 929 896 * 1003.1g breaking connected state with AF_UNSPEC 930 897 */ 931 898 other = NULL; 932 - unix_state_wlock(sk); 899 + unix_state_double_lock(sk, other); 933 900 } 934 901 935 902 /* ··· 938 905 if (unix_peer(sk)) { 939 906 struct sock *old_peer = unix_peer(sk); 940 907 unix_peer(sk)=other; 941 - unix_state_wunlock(sk); 908 + unix_state_double_unlock(sk, other); 942 909 943 910 if (other != old_peer) 944 911 unix_dgram_disconnected(sk, old_peer); 945 912 sock_put(old_peer); 946 913 } else { 947 914 unix_peer(sk)=other; 948 - unix_state_wunlock(sk); 915 + unix_state_double_unlock(sk, other); 949 916 } 950 917 return 0; 951 918 952 919 out_unlock: 953 - unix_state_wunlock(sk); 920 + unix_state_double_unlock(sk, other); 954 921 sock_put(other); 955 922 out: 956 923 return err; ··· 969 936 (skb_queue_len(&other->sk_receive_queue) > 970 937 other->sk_max_ack_backlog); 971 938 972 - unix_state_runlock(other); 939 + unix_state_unlock(other); 973 940 974 941 if (sched) 975 942 timeo = schedule_timeout(timeo); ··· 1027 994 goto out; 1028 995 1029 996 /* Latch state of peer */ 1030 - unix_state_rlock(other); 997 + unix_state_lock(other); 1031 998 1032 999 /* Apparently VFS overslept socket death. Retry. */ 1033 1000 if (sock_flag(other, SOCK_DEAD)) { 1034 - unix_state_runlock(other); 1001 + unix_state_unlock(other); 1035 1002 sock_put(other); 1036 1003 goto restart; 1037 1004 } ··· 1081 1048 goto out_unlock; 1082 1049 } 1083 1050 1084 - unix_state_wlock_nested(sk); 1051 + unix_state_lock_nested(sk); 1085 1052 1086 1053 if (sk->sk_state != st) { 1087 - unix_state_wunlock(sk); 1088 - unix_state_runlock(other); 1054 + unix_state_unlock(sk); 1055 + unix_state_unlock(other); 1089 1056 sock_put(other); 1090 1057 goto restart; 1091 1058 } 1092 1059 1093 1060 err = security_unix_stream_connect(sock, other->sk_socket, newsk); 1094 1061 if (err) { 1095 - unix_state_wunlock(sk); 1062 + unix_state_unlock(sk); 1096 1063 goto out_unlock; 1097 1064 } 1098 1065 ··· 1129 1096 smp_mb__after_atomic_inc(); /* sock_hold() does an atomic_inc() */ 1130 1097 unix_peer(sk) = newsk; 1131 1098 1132 - unix_state_wunlock(sk); 1099 + unix_state_unlock(sk); 1133 1100 1134 1101 /* take ten and and send info to listening sock */ 1135 1102 spin_lock(&other->sk_receive_queue.lock); ··· 1138 1105 * is installed to listening socket. */ 1139 1106 atomic_inc(&newu->inflight); 1140 1107 spin_unlock(&other->sk_receive_queue.lock); 1141 - unix_state_runlock(other); 1108 + unix_state_unlock(other); 1142 1109 other->sk_data_ready(other, 0); 1143 1110 sock_put(other); 1144 1111 return 0; 1145 1112 1146 1113 out_unlock: 1147 1114 if (other) 1148 - unix_state_runlock(other); 1115 + unix_state_unlock(other); 1149 1116 1150 1117 out: 1151 1118 if (skb) ··· 1211 1178 wake_up_interruptible(&unix_sk(sk)->peer_wait); 1212 1179 1213 1180 /* attach accepted sock to socket */ 1214 - unix_state_wlock(tsk); 1181 + unix_state_lock(tsk); 1215 1182 newsock->state = SS_CONNECTED; 1216 1183 sock_graft(tsk, newsock); 1217 - unix_state_wunlock(tsk); 1184 + unix_state_unlock(tsk); 1218 1185 return 0; 1219 1186 1220 1187 out: ··· 1241 1208 } 1242 1209 1243 1210 u = unix_sk(sk); 1244 - unix_state_rlock(sk); 1211 + unix_state_lock(sk); 1245 1212 if (!u->addr) { 1246 1213 sunaddr->sun_family = AF_UNIX; 1247 1214 sunaddr->sun_path[0] = 0; ··· 1252 1219 *uaddr_len = addr->len; 1253 1220 memcpy(sunaddr, addr->name, *uaddr_len); 1254 1221 } 1255 - unix_state_runlock(sk); 1222 + unix_state_unlock(sk); 1256 1223 sock_put(sk); 1257 1224 out: 1258 1225 return err; ··· 1370 1337 goto out_free; 1371 1338 } 1372 1339 1373 - unix_state_rlock(other); 1340 + unix_state_lock(other); 1374 1341 err = -EPERM; 1375 1342 if (!unix_may_send(sk, other)) 1376 1343 goto out_unlock; ··· 1380 1347 * Check with 1003.1g - what should 1381 1348 * datagram error 1382 1349 */ 1383 - unix_state_runlock(other); 1350 + unix_state_unlock(other); 1384 1351 sock_put(other); 1385 1352 1386 1353 err = 0; 1387 - unix_state_wlock(sk); 1354 + unix_state_lock(sk); 1388 1355 if (unix_peer(sk) == other) { 1389 1356 unix_peer(sk)=NULL; 1390 - unix_state_wunlock(sk); 1357 + unix_state_unlock(sk); 1391 1358 1392 1359 unix_dgram_disconnected(sk, other); 1393 1360 sock_put(other); 1394 1361 err = -ECONNREFUSED; 1395 1362 } else { 1396 - unix_state_wunlock(sk); 1363 + unix_state_unlock(sk); 1397 1364 } 1398 1365 1399 1366 other = NULL; ··· 1430 1397 } 1431 1398 1432 1399 skb_queue_tail(&other->sk_receive_queue, skb); 1433 - unix_state_runlock(other); 1400 + unix_state_unlock(other); 1434 1401 other->sk_data_ready(other, len); 1435 1402 sock_put(other); 1436 1403 scm_destroy(siocb->scm); 1437 1404 return len; 1438 1405 1439 1406 out_unlock: 1440 - unix_state_runlock(other); 1407 + unix_state_unlock(other); 1441 1408 out_free: 1442 1409 kfree_skb(skb); 1443 1410 out: ··· 1527 1494 goto out_err; 1528 1495 } 1529 1496 1530 - unix_state_rlock(other); 1497 + unix_state_lock(other); 1531 1498 1532 1499 if (sock_flag(other, SOCK_DEAD) || 1533 1500 (other->sk_shutdown & RCV_SHUTDOWN)) 1534 1501 goto pipe_err_free; 1535 1502 1536 1503 skb_queue_tail(&other->sk_receive_queue, skb); 1537 - unix_state_runlock(other); 1504 + unix_state_unlock(other); 1538 1505 other->sk_data_ready(other, size); 1539 1506 sent+=size; 1540 1507 } ··· 1545 1512 return sent; 1546 1513 1547 1514 pipe_err_free: 1548 - unix_state_runlock(other); 1515 + unix_state_unlock(other); 1549 1516 kfree_skb(skb); 1550 1517 pipe_err: 1551 1518 if (sent==0 && !(msg->msg_flags&MSG_NOSIGNAL)) ··· 1674 1641 { 1675 1642 DEFINE_WAIT(wait); 1676 1643 1677 - unix_state_rlock(sk); 1644 + unix_state_lock(sk); 1678 1645 1679 1646 for (;;) { 1680 1647 prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); ··· 1687 1654 break; 1688 1655 1689 1656 set_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags); 1690 - unix_state_runlock(sk); 1657 + unix_state_unlock(sk); 1691 1658 timeo = schedule_timeout(timeo); 1692 - unix_state_rlock(sk); 1659 + unix_state_lock(sk); 1693 1660 clear_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags); 1694 1661 } 1695 1662 1696 1663 finish_wait(sk->sk_sleep, &wait); 1697 - unix_state_runlock(sk); 1664 + unix_state_unlock(sk); 1698 1665 return timeo; 1699 1666 } 1700 1667 ··· 1849 1816 mode = (mode+1)&(RCV_SHUTDOWN|SEND_SHUTDOWN); 1850 1817 1851 1818 if (mode) { 1852 - unix_state_wlock(sk); 1819 + unix_state_lock(sk); 1853 1820 sk->sk_shutdown |= mode; 1854 1821 other=unix_peer(sk); 1855 1822 if (other) 1856 1823 sock_hold(other); 1857 - unix_state_wunlock(sk); 1824 + unix_state_unlock(sk); 1858 1825 sk->sk_state_change(sk); 1859 1826 1860 1827 if (other && ··· 1866 1833 peer_mode |= SEND_SHUTDOWN; 1867 1834 if (mode&SEND_SHUTDOWN) 1868 1835 peer_mode |= RCV_SHUTDOWN; 1869 - unix_state_wlock(other); 1836 + unix_state_lock(other); 1870 1837 other->sk_shutdown |= peer_mode; 1871 - unix_state_wunlock(other); 1838 + unix_state_unlock(other); 1872 1839 other->sk_state_change(other); 1873 1840 read_lock(&other->sk_callback_lock); 1874 1841 if (peer_mode == SHUTDOWN_MASK) ··· 2006 1973 else { 2007 1974 struct sock *s = v; 2008 1975 struct unix_sock *u = unix_sk(s); 2009 - unix_state_rlock(s); 1976 + unix_state_lock(s); 2010 1977 2011 1978 seq_printf(seq, "%p: %08X %08X %08X %04X %02X %5lu", 2012 1979 s, ··· 2034 2001 for ( ; i < len; i++) 2035 2002 seq_putc(seq, u->addr->name->sun_path[i]); 2036 2003 } 2037 - unix_state_runlock(s); 2004 + unix_state_unlock(s); 2038 2005 seq_putc(seq, '\n'); 2039 2006 } 2040 2007
+1 -1
net/wanrouter/wanmain.c
··· 454 454 } 455 455 456 456 if (conf->data_size && conf->data) { 457 - if (conf->data_size > 128000 || conf->data_size < 0) { 457 + if (conf->data_size > 128000) { 458 458 printk(KERN_INFO 459 459 "%s: ERROR, Invalid firmware data size %i !\n", 460 460 wandev->name, conf->data_size);