lwIP - A Lightweight TCP/IP stack - Patches: patch #9172, netif: Simplify netif_poll...
You are not allowed to post comments on this tracker with your current authentication level.
patch #9172: netif: Simplify netif_poll implementation
Submitter: | Axel Lin <axellin> | ||
Submitted: | Thu 24 Nov 2016 07:39:02 AM UTC | ||
Category: | None | Priority: | 5 - Normal |
Status: | Done | Privacy: | Public |
Assigned to: | None | Open/Closed: | Closed |
Planned Release: | None |
Fri 25 Nov 2016 12:04:46 PM UTC, comment #5: |
Dirk Ziegelmeier <dziegel> |
Fri 25 Nov 2016 11:50:13 AM UTC, comment #4: Hi Dirk,
|
Axel Lin <axellin> |
Fri 25 Nov 2016 11:26:38 AM UTC, comment #3: It's not about the while() loop. Problem is:
|
Dirk Ziegelmeier <dziegel> |
Fri 25 Nov 2016 11:26:11 AM UTC, comment #2: Are you sure it was protected before this patch?
|
Axel Lin <axellin> |
Fri 25 Nov 2016 11:18:52 AM UTC, comment #1: Invalid, because netif->loop_first is now accessed without locking (SYS_ARCH_PROTECT()...) |
Dirk Ziegelmeier <dziegel> |
Thu 24 Nov 2016 07:39:02 AM UTC, original submission:
Use while{} loop instead of do .. while{} loop, then we can avoid NULL test for in pointer in each loop and reduce a level of indent.
|
Axel Lin <axellin> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 5 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2016-11-25 | dziegel | Status | Wont Do | Done | |
2016-11-25 | axellin | Attached File | - | Added 0001-netif-Add-proper-lock-protect-for-accessing-netif-lo.patch, #39067 | |
2016-11-25 | dziegel | Status | None | Wont Do | |
Open/Closed | Open | Closed | |||
2016-11-24 | axellin | Attached File | - | Added 0001-netif-Simplify-netif_poll-implementation.patch, #39064 |
Powered by Savane 3.13-caa5.
Corresponding source code
As I said, the problem was NOT the while() condition. This does not need to be protected.
The protection + the if() condition were needed to avoid the NULL pointer dereference.
You new patch is OK and more readable than the old code.