hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/net/dccp/output.c
....@@ -1,13 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * net/dccp/output.c
34 *
45 * An implementation of the DCCP protocol
56 * Arnaldo Carvalho de Melo <acme@conectiva.com.br>
6
- *
7
- * This program is free software; you can redistribute it and/or
8
- * modify it under the terms of the GNU General Public License
9
- * as published by the Free Software Foundation; either version
10
- * 2 of the License, or (at your option) any later version.
117 */
128
139 #include <linux/dccp.h>
....@@ -66,7 +62,7 @@
6662 switch (dcb->dccpd_type) {
6763 case DCCP_PKT_DATA:
6864 set_ack = 0;
69
- /* fall through */
65
+ fallthrough;
7066 case DCCP_PKT_DATAACK:
7167 case DCCP_PKT_RESET:
7268 break;
....@@ -76,12 +72,12 @@
7672 /* Use ISS on the first (non-retransmitted) Request. */
7773 if (icsk->icsk_retransmits == 0)
7874 dcb->dccpd_seq = dp->dccps_iss;
79
- /* fall through */
75
+ fallthrough;
8076
8177 case DCCP_PKT_SYNC:
8278 case DCCP_PKT_SYNCACK:
8379 ackno = dcb->dccpd_ack_seq;
84
- /* fall through */
80
+ fallthrough;
8581 default:
8682 /*
8783 * Set owner/destructor: some skbs are allocated via
....@@ -189,7 +185,7 @@
189185
190186 /* And store cached results */
191187 icsk->icsk_pmtu_cookie = pmtu;
192
- dp->dccps_mss_cache = cur_mps;
188
+ WRITE_ONCE(dp->dccps_mss_cache, cur_mps);
193189
194190 return cur_mps;
195191 }
....@@ -485,7 +481,7 @@
485481 case DCCP_RESET_CODE_PACKET_ERROR:
486482 dhr->dccph_reset_data[0] = rxdh->dccph_type;
487483 break;
488
- case DCCP_RESET_CODE_OPTION_ERROR: /* fall through */
484
+ case DCCP_RESET_CODE_OPTION_ERROR:
489485 case DCCP_RESET_CODE_MANDATORY_ERROR:
490486 memcpy(dhr->dccph_reset_data, dcb->dccpd_reset_data, 3);
491487 break;