Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A lock is missing to relaese in snull_get_tx_buffer #73

Open
ryancaicse opened this issue Dec 14, 2021 · 2 comments
Open

A lock is missing to relaese in snull_get_tx_buffer #73

ryancaicse opened this issue Dec 14, 2021 · 2 comments

Comments

@ryancaicse
Copy link

The lock is missing to release at Line 143. Should it be a bug?

ldd3/snull/snull.c

Lines 139 to 150 in dd5c9c7

spin_lock_irqsave(&priv->lock, flags);
pkt = priv->ppool;
if(!pkt) {
PDEBUG("Out of Pool\n");
return pkt;
}
priv->ppool = pkt->next;
if (priv->ppool == NULL) {
printk (KERN_INFO "Pool empty\n");
netif_stop_queue(dev);
}
spin_unlock_irqrestore(&priv->lock, flags);

@jypan-ccu
Copy link
Contributor

Yes I think you are right.

@dwalkes
Copy link
Collaborator

dwalkes commented Mar 9, 2023

@ryancaicse send a pull request if you like

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants