Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 156875 Details for
Bug 244026
[RHEL4]: Kernel crash when adding an IPv4 route with NLM_F_ECHO
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
[NETLINK]: Unshare SKB, as necessary, in netlink_trim()
linux-2.6.9-netlink-unshare-skb.patch (text/plain), 1.60 KB, created by
Chris Lalancette
on 2007-06-13 13:36:04 UTC
(
hide
)
Description:
[NETLINK]: Unshare SKB, as necessary, in netlink_trim()
Filename:
MIME Type:
Creator:
Chris Lalancette
Created:
2007-06-13 13:36:04 UTC
Size:
1.60 KB
patch
obsolete
>diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c >index 83e1bf2..7f94408 100644 >--- a/net/netlink/af_netlink.c >+++ b/net/netlink/af_netlink.c >@@ -670,7 +670,7 @@ void netlink_detachskb(struct sock *sk, > sock_put(sk); > } > >-static inline void netlink_trim(struct sk_buff *skb, int allocation) >+static inline struct sk_buff *netlink_trim(struct sk_buff *skb, int allocation) > { > int delta; > >@@ -678,10 +678,20 @@ static inline void netlink_trim(struct s > > delta = skb->end - skb->tail; > if (delta * 2 < skb->truesize) >- return; >- if (pskb_expand_head(skb, 0, -delta, allocation)) >- return; >- skb->truesize -= delta; >+ return skb; >+ >+ if (skb_shared(skb)) { >+ struct sk_buff *nskb = skb_clone(skb, allocation); >+ if (!nskb) >+ return skb; >+ kfree_skb(skb); >+ skb = nskb; >+ } >+ >+ if (!pskb_expand_head(skb, 0, -delta, allocation)) >+ skb->truesize -= delta; >+ >+ return skb; > } > > int netlink_unicast(struct sock *ssk, struct sk_buff *skb, u32 pid, int nonblock) >@@ -690,7 +700,7 @@ int netlink_unicast(struct sock *ssk, st > int err; > long timeo; > >- netlink_trim(skb, gfp_any()); >+ skb = netlink_trim(skb, gfp_any()); > > timeo = sock_sndtimeo(ssk, nonblock); > retry: >@@ -788,6 +798,8 @@ int netlink_broadcast(struct sock *ssk, > struct hlist_node *node; > struct sock *sk; > >+ skb = netlink_trim(skb, allocation); >+ > info.exclude_sk = ssk; > info.pid = pid; > info.group = group; >@@ -798,8 +810,6 @@ int netlink_broadcast(struct sock *ssk, > info.skb = skb; > info.skb2 = NULL; > >- netlink_trim(skb, allocation); >- > /* While we sleep in clone, do not allow to change socket list */ > > netlink_lock_table();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 244026
:
156871
|
156874
| 156875