Commit 533da29b authored by David S. Miller's avatar David S. Miller

Merge branch 'bcmgenet-Fragmented-SKB-corrections'

Doug Berger says:

====================
bcmgenet: Fragmented SKB corrections

Two issues were observed in a review of the bcmgenet driver support for
fragmented SKBs which are addressed by this patch set.

The first addresses a problem that could occur if the driver is not able
to DMA map a fragment of the SKB.  This would be a highly unusual event
but it would leave the hardware descriptors in an invalid state which
should be prevented.

The second is a hazard that could occur if the driver is able to reclaim
the first control block of a fragmented SKB before all of its fragments
have completed processing by the hardware.  In this case the SKB could
be freed leading to reuse of memory that is still in use by hardware.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents ea6c3077 f48bed16
...@@ -544,6 +544,8 @@ struct bcmgenet_hw_params { ...@@ -544,6 +544,8 @@ struct bcmgenet_hw_params {
}; };
struct bcmgenet_skb_cb { struct bcmgenet_skb_cb {
struct enet_cb *first_cb; /* First control block of SKB */
struct enet_cb *last_cb; /* Last control block of SKB */
unsigned int bytes_sent; /* bytes on the wire (no TSB) */ unsigned int bytes_sent; /* bytes on the wire (no TSB) */
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment