hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/net/x25/x25_dev.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * X.25 Packet Layer release 002
34 *
....@@ -5,12 +6,6 @@
56 * releases, misbehave and/or generally screw up. It might even work.
67 *
78 * This code REQUIRES 2.1.15 or higher
8
- *
9
- * This module:
10
- * This module is free software; you can redistribute it and/or
11
- * modify it under the terms of the GNU General Public License
12
- * as published by the Free Software Foundation; either version
13
- * 2 of the License, or (at your option) any later version.
149 *
1510 * History
1611 * X.25 001 Jonathan Naylor Started coding.
....@@ -60,7 +55,7 @@
6055 if (!sock_owned_by_user(sk)) {
6156 queued = x25_process_rx_frame(sk, skb);
6257 } else {
63
- queued = !sk_add_backlog(sk, skb, sk->sk_rcvbuf);
58
+ queued = !sk_add_backlog(sk, skb, READ_ONCE(sk->sk_rcvbuf));
6459 }
6560 bh_unlock_sock(sk);
6661 sock_put(sk);
....@@ -122,7 +117,7 @@
122117
123118 if (!pskb_may_pull(skb, 1)) {
124119 x25_neigh_put(nb);
125
- return 0;
120
+ goto drop;
126121 }
127122
128123 switch (skb->data[0]) {