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
4382f5c3
Commit
4382f5c3
authored
Oct 06, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: Add missing skb_share_check() calls to econet/bpqether/lapbether/ipconfig.
parent
0e8cef16
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
13 deletions
+28
-13
drivers/net/hamradio/bpqether.c
drivers/net/hamradio/bpqether.c
+3
-0
drivers/net/wan/lapbether.c
drivers/net/wan/lapbether.c
+3
-0
net/econet/af_econet.c
net/econet/af_econet.c
+16
-13
net/ipv4/ipconfig.c
net/ipv4/ipconfig.c
+6
-0
No files found.
drivers/net/hamradio/bpqether.c
View file @
4382f5c3
...
...
@@ -175,6 +175,9 @@ static int bpq_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_ty
struct
ethhdr
*
eth
;
struct
bpqdev
*
bpq
;
if
((
skb
=
skb_share_check
(
skb
,
GFP_ATOMIC
))
==
NULL
)
return
NET_RX_DROP
;
if
(
!
pskb_may_pull
(
skb
,
sizeof
(
struct
ethhdr
)))
goto
drop
;
...
...
drivers/net/wan/lapbether.c
View file @
4382f5c3
...
...
@@ -89,6 +89,9 @@ static int lapbeth_rcv(struct sk_buff *skb, struct net_device *dev, struct packe
int
len
,
err
;
struct
lapbethdev
*
lapbeth
;
if
((
skb
=
skb_share_check
(
skb
,
GFP_ATOMIC
))
==
NULL
)
return
NET_RX_DROP
;
if
(
!
pskb_may_pull
(
skb
,
2
))
goto
drop
;
...
...
net/econet/af_econet.c
View file @
4382f5c3
...
...
@@ -1015,16 +1015,17 @@ static int econet_rcv(struct sk_buff *skb, struct net_device *dev, struct packet
struct
sock
*
sk
;
struct
ec_device
*
edev
=
dev
->
ec_ptr
;
if
(
!
edev
)
{
kfree_skb
(
skb
);
return
0
;
}
if
(
skb
->
pkt_type
==
PACKET_OTHERHOST
)
goto
drop
;
if
(
!
pskb_may_pull
(
skb
,
sizeof
(
struct
ec_framehdr
)))
{
/* Frame is too small to be any use */
kfree_skb
(
skb
);
return
0
;
}
if
(
!
edev
)
goto
drop
;
if
((
skb
=
skb_share_check
(
skb
,
GFP_ATOMIC
))
==
NULL
)
return
NET_RX_DROP
;
if
(
!
pskb_may_pull
(
skb
,
sizeof
(
struct
ec_framehdr
)))
goto
drop
;
hdr
=
(
struct
ec_framehdr
*
)
skb
->
data
;
...
...
@@ -1037,13 +1038,15 @@ static int econet_rcv(struct sk_buff *skb, struct net_device *dev, struct packet
}
sk
=
ec_listening_socket
(
hdr
->
port
,
hdr
->
src_stn
,
hdr
->
src_net
);
if
(
!
sk
)
{
kfree_skb
(
skb
);
return
0
;
}
if
(
!
sk
)
goto
drop
;
return
ec_queue_packet
(
sk
,
skb
,
edev
->
net
,
hdr
->
src_stn
,
hdr
->
cb
,
hdr
->
port
);
drop:
kfree_skb
(
skb
);
return
0
;
}
static
struct
packet_type
econet_packet_type
=
{
...
...
net/ipv4/ipconfig.c
View file @
4382f5c3
...
...
@@ -415,6 +415,9 @@ ic_rarp_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt
unsigned
char
*
sha
,
*
tha
;
/* s for "source", t for "target" */
struct
ic_device
*
d
;
if
((
skb
=
skb_share_check
(
skb
,
GFP_ATOMIC
))
==
NULL
)
return
NET_RX_DROP
;
if
(
!
pskb_may_pull
(
skb
,
sizeof
(
arphdr
)))
goto
drop
;
...
...
@@ -823,6 +826,9 @@ static int __init ic_bootp_recv(struct sk_buff *skb, struct net_device *dev, str
if
(
skb
->
pkt_type
==
PACKET_OTHERHOST
)
goto
drop
;
if
((
skb
=
skb_share_check
(
skb
,
GFP_ATOMIC
))
==
NULL
)
return
NET_RX_DROP
;
if
(
!
pskb_may_pull
(
skb
,
sizeof
(
struct
iphdr
)
+
sizeof
(
struct
udphdr
)))
...
...
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