summaryrefslogtreecommitdiff
path: root/net/atm
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2024-01-02 22:03:04 +0300
committerDan Williams <dan.j.williams@intel.com>2024-01-02 22:03:04 +0300
commit11c83932028714014e4259072bd230473d6db730 (patch)
treeba5de3af7a65a6a60ebb1f0a36328fd853130ecd /net/atm
parent58f1e9d3a30438042fc9ed65b3dc56b2e5f7886a (diff)
parent185c1a489f873cb71520fc089401e02dbf302dcd (diff)
downloadlinux-11c83932028714014e4259072bd230473d6db730.tar.xz
Merge branch 'for-6.8/cxl-cdat' into for-6.8/cxl
Pick up the CDAT parsing and QOS class infrastructure for v6.8.
Diffstat (limited to 'net/atm')
-rw-r--r--net/atm/ioctl.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/atm/ioctl.c b/net/atm/ioctl.c
index 838ebf0cabbf..f81f8d56f5c0 100644
--- a/net/atm/ioctl.c
+++ b/net/atm/ioctl.c
@@ -73,14 +73,17 @@ static int do_vcc_ioctl(struct socket *sock, unsigned int cmd,
case SIOCINQ:
{
struct sk_buff *skb;
+ int amount;
if (sock->state != SS_CONNECTED) {
error = -EINVAL;
goto done;
}
+ spin_lock_irq(&sk->sk_receive_queue.lock);
skb = skb_peek(&sk->sk_receive_queue);
- error = put_user(skb ? skb->len : 0,
- (int __user *)argp) ? -EFAULT : 0;
+ amount = skb ? skb->len : 0;
+ spin_unlock_irq(&sk->sk_receive_queue.lock);
+ error = put_user(amount, (int __user *)argp) ? -EFAULT : 0;
goto done;
}
case ATM_SETSC: