aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/bluetooth/hci_conn.c10
-rw-r--r--net/bluetooth/hci_sysfs.c1
-rw-r--r--net/ipv4/ipconfig.c1
-rw-r--r--net/ipv4/tcp_input.c19
4 files changed, 14 insertions, 17 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 9483320f6dad..34d1a3c822bf 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -259,22 +259,14 @@ int hci_conn_del(struct hci_conn *conn)
259 } 259 }
260 260
261 tasklet_disable(&hdev->tx_task); 261 tasklet_disable(&hdev->tx_task);
262
263 hci_conn_del_sysfs(conn);
264
265 hci_conn_hash_del(hdev, conn); 262 hci_conn_hash_del(hdev, conn);
266 if (hdev->notify) 263 if (hdev->notify)
267 hdev->notify(hdev, HCI_NOTIFY_CONN_DEL); 264 hdev->notify(hdev, HCI_NOTIFY_CONN_DEL);
268
269 tasklet_enable(&hdev->tx_task); 265 tasklet_enable(&hdev->tx_task);
270
271 skb_queue_purge(&conn->data_q); 266 skb_queue_purge(&conn->data_q);
272 267 hci_conn_del_sysfs(conn);
273 hci_dev_put(hdev); 268 hci_dev_put(hdev);
274 269
275 /* will free via device release */
276 put_device(&conn->dev);
277
278 return 0; 270 return 0;
279} 271}
280 272
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
index cef1e3e1881c..cad510309dcf 100644
--- a/net/bluetooth/hci_sysfs.c
+++ b/net/bluetooth/hci_sysfs.c
@@ -320,6 +320,7 @@ static void del_conn(struct work_struct *work)
320{ 320{
321 struct hci_conn *conn = container_of(work, struct hci_conn, work); 321 struct hci_conn *conn = container_of(work, struct hci_conn, work);
322 device_del(&conn->dev); 322 device_del(&conn->dev);
323 put_device(&conn->dev);
323} 324}
324 325
325void hci_conn_del_sysfs(struct hci_conn *conn) 326void hci_conn_del_sysfs(struct hci_conn *conn)
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index 420f56ad59f8..56a675734ea5 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -1440,6 +1440,7 @@ static int __init ip_auto_config_setup(char *addrs)
1440 int num = 0; 1440 int num = 0;
1441 1441
1442 ic_set_manually = 1; 1442 ic_set_manually = 1;
1443 ic_enable = 1;
1443 1444
1444 if (ic_proto_name(addrs)) 1445 if (ic_proto_name(addrs))
1445 return 1; 1446 return 1;
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 889c89362bfc..b39f0d86e44c 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -2651,6 +2651,7 @@ static int tcp_clean_rtx_queue(struct sock *sk, s32 *seq_rtt_p,
2651 u32 cnt = 0; 2651 u32 cnt = 0;
2652 u32 reord = tp->packets_out; 2652 u32 reord = tp->packets_out;
2653 s32 seq_rtt = -1; 2653 s32 seq_rtt = -1;
2654 s32 ca_seq_rtt = -1;
2654 ktime_t last_ackt = net_invalid_timestamp(); 2655 ktime_t last_ackt = net_invalid_timestamp();
2655 2656
2656 while ((skb = tcp_write_queue_head(sk)) && skb != tcp_send_head(sk)) { 2657 while ((skb = tcp_write_queue_head(sk)) && skb != tcp_send_head(sk)) {
@@ -2659,6 +2660,7 @@ static int tcp_clean_rtx_queue(struct sock *sk, s32 *seq_rtt_p,
2659 u32 packets_acked; 2660 u32 packets_acked;
2660 u8 sacked = scb->sacked; 2661 u8 sacked = scb->sacked;
2661 2662
2663 /* Determine how many packets and what bytes were acked, tso and else */
2662 if (after(scb->end_seq, tp->snd_una)) { 2664 if (after(scb->end_seq, tp->snd_una)) {
2663 if (tcp_skb_pcount(skb) == 1 || 2665 if (tcp_skb_pcount(skb) == 1 ||
2664 !after(tp->snd_una, scb->seq)) 2666 !after(tp->snd_una, scb->seq))
@@ -2686,15 +2688,16 @@ static int tcp_clean_rtx_queue(struct sock *sk, s32 *seq_rtt_p,
2686 if (sacked & TCPCB_SACKED_RETRANS) 2688 if (sacked & TCPCB_SACKED_RETRANS)
2687 tp->retrans_out -= packets_acked; 2689 tp->retrans_out -= packets_acked;
2688 flag |= FLAG_RETRANS_DATA_ACKED; 2690 flag |= FLAG_RETRANS_DATA_ACKED;
2691 ca_seq_rtt = -1;
2689 seq_rtt = -1; 2692 seq_rtt = -1;
2690 if ((flag & FLAG_DATA_ACKED) || 2693 if ((flag & FLAG_DATA_ACKED) ||
2691 (packets_acked > 1)) 2694 (packets_acked > 1))
2692 flag |= FLAG_NONHEAD_RETRANS_ACKED; 2695 flag |= FLAG_NONHEAD_RETRANS_ACKED;
2693 } else { 2696 } else {
2697 ca_seq_rtt = now - scb->when;
2698 last_ackt = skb->tstamp;
2694 if (seq_rtt < 0) { 2699 if (seq_rtt < 0) {
2695 seq_rtt = now - scb->when; 2700 seq_rtt = ca_seq_rtt;
2696 if (fully_acked)
2697 last_ackt = skb->tstamp;
2698 } 2701 }
2699 if (!(sacked & TCPCB_SACKED_ACKED)) 2702 if (!(sacked & TCPCB_SACKED_ACKED))
2700 reord = min(cnt, reord); 2703 reord = min(cnt, reord);
@@ -2709,10 +2712,10 @@ static int tcp_clean_rtx_queue(struct sock *sk, s32 *seq_rtt_p,
2709 !before(end_seq, tp->snd_up)) 2712 !before(end_seq, tp->snd_up))
2710 tp->urg_mode = 0; 2713 tp->urg_mode = 0;
2711 } else { 2714 } else {
2715 ca_seq_rtt = now - scb->when;
2716 last_ackt = skb->tstamp;
2712 if (seq_rtt < 0) { 2717 if (seq_rtt < 0) {
2713 seq_rtt = now - scb->when; 2718 seq_rtt = ca_seq_rtt;
2714 if (fully_acked)
2715 last_ackt = skb->tstamp;
2716 } 2719 }
2717 reord = min(cnt, reord); 2720 reord = min(cnt, reord);
2718 } 2721 }
@@ -2772,8 +2775,8 @@ static int tcp_clean_rtx_queue(struct sock *sk, s32 *seq_rtt_p,
2772 net_invalid_timestamp())) 2775 net_invalid_timestamp()))
2773 rtt_us = ktime_us_delta(ktime_get_real(), 2776 rtt_us = ktime_us_delta(ktime_get_real(),
2774 last_ackt); 2777 last_ackt);
2775 else if (seq_rtt > 0) 2778 else if (ca_seq_rtt > 0)
2776 rtt_us = jiffies_to_usecs(seq_rtt); 2779 rtt_us = jiffies_to_usecs(ca_seq_rtt);
2777 } 2780 }
2778 2781
2779 ca_ops->pkts_acked(sk, pkts_acked, rtt_us); 2782 ca_ops->pkts_acked(sk, pkts_acked, rtt_us);