Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
9f7f0098
Commit
9f7f0098
authored
Aug 19, 2005
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[netdrvr eepro100] check for skb==NULL before calling rx_align(skb)
parent
b4ee21f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
drivers/net/eepro100.c
drivers/net/eepro100.c
+4
-4
No files found.
drivers/net/eepro100.c
View file @
9f7f0098
...
@@ -1263,8 +1263,8 @@ speedo_init_rx_ring(struct net_device *dev)
...
@@ -1263,8 +1263,8 @@ speedo_init_rx_ring(struct net_device *dev)
for
(
i
=
0
;
i
<
RX_RING_SIZE
;
i
++
)
{
for
(
i
=
0
;
i
<
RX_RING_SIZE
;
i
++
)
{
struct
sk_buff
*
skb
;
struct
sk_buff
*
skb
;
skb
=
dev_alloc_skb
(
PKT_BUF_SZ
+
sizeof
(
struct
RxFD
));
skb
=
dev_alloc_skb
(
PKT_BUF_SZ
+
sizeof
(
struct
RxFD
));
/* XXX: do we really want to call this before the NULL check? --hch */
if
(
skb
)
rx_align
(
skb
);
/* Align IP on 16 byte boundary */
rx_align
(
skb
);
/* Align IP on 16 byte boundary */
sp
->
rx_skbuff
[
i
]
=
skb
;
sp
->
rx_skbuff
[
i
]
=
skb
;
if
(
skb
==
NULL
)
if
(
skb
==
NULL
)
break
;
/* OK. Just initially short of Rx bufs. */
break
;
/* OK. Just initially short of Rx bufs. */
...
@@ -1654,8 +1654,8 @@ static inline struct RxFD *speedo_rx_alloc(struct net_device *dev, int entry)
...
@@ -1654,8 +1654,8 @@ static inline struct RxFD *speedo_rx_alloc(struct net_device *dev, int entry)
struct
sk_buff
*
skb
;
struct
sk_buff
*
skb
;
/* Get a fresh skbuff to replace the consumed one. */
/* Get a fresh skbuff to replace the consumed one. */
skb
=
dev_alloc_skb
(
PKT_BUF_SZ
+
sizeof
(
struct
RxFD
));
skb
=
dev_alloc_skb
(
PKT_BUF_SZ
+
sizeof
(
struct
RxFD
));
/* XXX: do we really want to call this before the NULL check? --hch */
if
(
skb
)
rx_align
(
skb
);
/* Align IP on 16 byte boundary */
rx_align
(
skb
);
/* Align IP on 16 byte boundary */
sp
->
rx_skbuff
[
entry
]
=
skb
;
sp
->
rx_skbuff
[
entry
]
=
skb
;
if
(
skb
==
NULL
)
{
if
(
skb
==
NULL
)
{
sp
->
rx_ringp
[
entry
]
=
NULL
;
sp
->
rx_ringp
[
entry
]
=
NULL
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment