| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * X.25 Packet Layer release 002 |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 5 | 6 | * releases, misbehave and/or generally screw up. It might even work. |
|---|
| 6 | 7 | * |
|---|
| 7 | 8 | * 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. |
|---|
| 14 | 9 | * |
|---|
| 15 | 10 | * History |
|---|
| 16 | 11 | * X.25 001 Jonathan Naylor Started coding. |
|---|
| .. | .. |
|---|
| 60 | 55 | if (!sock_owned_by_user(sk)) { |
|---|
| 61 | 56 | queued = x25_process_rx_frame(sk, skb); |
|---|
| 62 | 57 | } else { |
|---|
| 63 | | - queued = !sk_add_backlog(sk, skb, sk->sk_rcvbuf); |
|---|
| 58 | + queued = !sk_add_backlog(sk, skb, READ_ONCE(sk->sk_rcvbuf)); |
|---|
| 64 | 59 | } |
|---|
| 65 | 60 | bh_unlock_sock(sk); |
|---|
| 66 | 61 | sock_put(sk); |
|---|
| .. | .. |
|---|
| 122 | 117 | |
|---|
| 123 | 118 | if (!pskb_may_pull(skb, 1)) { |
|---|
| 124 | 119 | x25_neigh_put(nb); |
|---|
| 125 | | - return 0; |
|---|
| 120 | + goto drop; |
|---|
| 126 | 121 | } |
|---|
| 127 | 122 | |
|---|
| 128 | 123 | switch (skb->data[0]) { |
|---|