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
Kirill Smelkov
linux
Commits
609c0d95
Commit
609c0d95
authored
Oct 06, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NETLINK]: Set socket error on netlink_ack() allocation failure.
parent
4382f5c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
net/netlink/af_netlink.c
net/netlink/af_netlink.c
+11
-1
No files found.
net/netlink/af_netlink.c
View file @
609c0d95
...
@@ -898,8 +898,18 @@ void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err)
...
@@ -898,8 +898,18 @@ void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err)
size
=
NLMSG_SPACE
(
4
+
NLMSG_ALIGN
(
nlh
->
nlmsg_len
));
size
=
NLMSG_SPACE
(
4
+
NLMSG_ALIGN
(
nlh
->
nlmsg_len
));
skb
=
alloc_skb
(
size
,
GFP_KERNEL
);
skb
=
alloc_skb
(
size
,
GFP_KERNEL
);
if
(
!
skb
)
if
(
!
skb
)
{
struct
sock
*
sk
;
sk
=
netlink_lookup
(
in_skb
->
sk
->
sk_protocol
,
NETLINK_CB
(
in_skb
).
pid
);
if
(
sk
)
{
sk
->
sk_err
=
ENOBUFS
;
sk
->
sk_error_report
(
sk
);
sock_put
(
sk
);
}
return
;
return
;
}
rep
=
__nlmsg_put
(
skb
,
NETLINK_CB
(
in_skb
).
pid
,
nlh
->
nlmsg_seq
,
rep
=
__nlmsg_put
(
skb
,
NETLINK_CB
(
in_skb
).
pid
,
nlh
->
nlmsg_seq
,
NLMSG_ERROR
,
sizeof
(
struct
nlmsgerr
));
NLMSG_ERROR
,
sizeof
(
struct
nlmsgerr
));
...
...
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