/* br_input.c, br_handle_frame() */
123 p = skb->dev->br_port;
124 if (p == NULL)
125 goto err_nolock;
126
127 br = p->br;
128 read_lock(&br->lock);
129 if (skb->dev->br_port == NULL)
130 goto err;
What protection do lines 129-130 offer over and above lines 124-125?
If the second check is unnecessary, it should be removed; however,
if it is necessary, "p" should be reassigned as well, correct?
read_lock(&br->lock);
- if (skb->dev->br_port == NULL)
+ p = skb->dev->br_port;
+ if (p == NULL)
goto err;
But if "p" can change between lines 123 and 129, that means "br = p->br;"
may change too, and thus the wrong "br->lock" may be locked.
I'm so confused! |(:^p
--
Dan Eble <[EMAIL PROTECTED]> _____ .
| _ |/|
Applied Innovation Inc. | |_| | |
http://www.aiinet.com/ |__/|_|_|
_______________________________________________
Bridge mailing list
[EMAIL PROTECTED]
http://www.math.leidenuniv.nl/mailman/listinfo/bridge