aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@ghostprotocols.net>2005-05-05 16:35:15 -0400
committerDavid S. Miller <davem@davemloft.net>2005-05-05 16:35:15 -0400
commit476e19cfa131e2b6eedc4017b627cdc4ca419ffb (patch)
tree8c6881affa0d20a3ce2dd8d4f9a5b0ba588916c5 /include
parent25ae3f59b10dbd5e2b9b192ecc90ea935cc23e68 (diff)
[IPV6]: Fix OOPS when using IPV6_ADDRFORM
This causes sk->sk_prot to change, which makes the socket release free the sock into the wrong SLAB cache. Fix this by introducing sk_prot_creator so that we always remember where the sock came from. Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/sock.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index cc4c9190b7fd..77f02f86346e 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -141,6 +141,7 @@ struct sock_common {
141 * @sk_callback_lock: used with the callbacks in the end of this struct 141 * @sk_callback_lock: used with the callbacks in the end of this struct
142 * @sk_error_queue: rarely used 142 * @sk_error_queue: rarely used
143 * @sk_prot: protocol handlers inside a network family 143 * @sk_prot: protocol handlers inside a network family
144 * @sk_prot_creator: sk_prot of original sock creator (see ipv6_setsockopt, IPV6_ADDRFORM for instance)
144 * @sk_err: last error 145 * @sk_err: last error
145 * @sk_err_soft: errors that don't cause failure but are the cause of a persistent failure not just 'timed out' 146 * @sk_err_soft: errors that don't cause failure but are the cause of a persistent failure not just 'timed out'
146 * @sk_ack_backlog: current listen backlog 147 * @sk_ack_backlog: current listen backlog
@@ -218,6 +219,7 @@ struct sock {
218 } sk_backlog; 219 } sk_backlog;
219 struct sk_buff_head sk_error_queue; 220 struct sk_buff_head sk_error_queue;
220 struct proto *sk_prot; 221 struct proto *sk_prot;
222 struct proto *sk_prot_creator;
221 rwlock_t sk_callback_lock; 223 rwlock_t sk_callback_lock;
222 int sk_err, 224 int sk_err,
223 sk_err_soft; 225 sk_err_soft;