Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
95aa1fe4
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
95aa1fe4
编写于
7月 16, 2009
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6
上级
b13bb2e9
941297f4
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
28 addition
and
6 deletion
+28
-6
Documentation/RCU/rculist_nulls.txt
Documentation/RCU/rculist_nulls.txt
+6
-1
MAINTAINERS
MAINTAINERS
+1
-0
net/netfilter/nf_conntrack_core.c
net/netfilter/nf_conntrack_core.c
+18
-3
net/netfilter/xt_osf.c
net/netfilter/xt_osf.c
+3
-2
未找到文件。
Documentation/RCU/rculist_nulls.txt
浏览文件 @
95aa1fe4
...
...
@@ -83,11 +83,12 @@ not detect it missed following items in original chain.
obj = kmem_cache_alloc(...);
lock_chain(); // typically a spin_lock()
obj->key = key;
atomic_inc(&obj->refcnt);
/*
* we need to make sure obj->key is updated before obj->next
* or obj->refcnt
*/
smp_wmb();
atomic_set(&obj->refcnt, 1);
hlist_add_head_rcu(&obj->obj_node, list);
unlock_chain(); // typically a spin_unlock()
...
...
@@ -159,6 +160,10 @@ out:
obj = kmem_cache_alloc(cachep);
lock_chain(); // typically a spin_lock()
obj->key = key;
/*
* changes to obj->key must be visible before refcnt one
*/
smp_wmb();
atomic_set(&obj->refcnt, 1);
/*
* insert obj in RCU way (readers might be traversing chain)
...
...
MAINTAINERS
浏览文件 @
95aa1fe4
...
...
@@ -4044,6 +4044,7 @@ L: netfilter@vger.kernel.org
L: coreteam@netfilter.org
W: http://www.netfilter.org/
W: http://www.iptables.org/
T: git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6.git
S: Supported
F: include/linux/netfilter*
F: include/linux/netfilter/
...
...
net/netfilter/nf_conntrack_core.c
浏览文件 @
95aa1fe4
...
...
@@ -561,23 +561,38 @@ struct nf_conn *nf_conntrack_alloc(struct net *net,
}
}
ct
=
kmem_cache_zalloc
(
nf_conntrack_cachep
,
gfp
);
/*
* Do not use kmem_cache_zalloc(), as this cache uses
* SLAB_DESTROY_BY_RCU.
*/
ct
=
kmem_cache_alloc
(
nf_conntrack_cachep
,
gfp
);
if
(
ct
==
NULL
)
{
pr_debug
(
"nf_conntrack_alloc: Can't alloc conntrack.
\n
"
);
atomic_dec
(
&
net
->
ct
.
count
);
return
ERR_PTR
(
-
ENOMEM
);
}
/*
* Let ct->tuplehash[IP_CT_DIR_ORIGINAL].hnnode.next
* and ct->tuplehash[IP_CT_DIR_REPLY].hnnode.next unchanged.
*/
memset
(
&
ct
->
tuplehash
[
IP_CT_DIR_MAX
],
0
,
sizeof
(
*
ct
)
-
offsetof
(
struct
nf_conn
,
tuplehash
[
IP_CT_DIR_MAX
]));
spin_lock_init
(
&
ct
->
lock
);
atomic_set
(
&
ct
->
ct_general
.
use
,
1
);
ct
->
tuplehash
[
IP_CT_DIR_ORIGINAL
].
tuple
=
*
orig
;
ct
->
tuplehash
[
IP_CT_DIR_ORIGINAL
].
hnnode
.
pprev
=
NULL
;
ct
->
tuplehash
[
IP_CT_DIR_REPLY
].
tuple
=
*
repl
;
ct
->
tuplehash
[
IP_CT_DIR_REPLY
].
hnnode
.
pprev
=
NULL
;
/* Don't set timer yet: wait for confirmation */
setup_timer
(
&
ct
->
timeout
,
death_by_timeout
,
(
unsigned
long
)
ct
);
#ifdef CONFIG_NET_NS
ct
->
ct_net
=
net
;
#endif
/*
* changes to lookup keys must be done before setting refcnt to 1
*/
smp_wmb
();
atomic_set
(
&
ct
->
ct_general
.
use
,
1
);
return
ct
;
}
EXPORT_SYMBOL_GPL
(
nf_conntrack_alloc
);
...
...
net/netfilter/xt_osf.c
浏览文件 @
95aa1fe4
...
...
@@ -330,7 +330,8 @@ static bool xt_osf_match_packet(const struct sk_buff *skb,
fcount
++
;
if
(
info
->
flags
&
XT_OSF_LOG
)
nf_log_packet
(
p
->
hooknum
,
0
,
skb
,
p
->
in
,
p
->
out
,
NULL
,
nf_log_packet
(
p
->
family
,
p
->
hooknum
,
skb
,
p
->
in
,
p
->
out
,
NULL
,
"%s [%s:%s] : %pi4:%d -> %pi4:%d hops=%d
\n
"
,
f
->
genre
,
f
->
version
,
f
->
subtype
,
&
ip
->
saddr
,
ntohs
(
tcp
->
source
),
...
...
@@ -345,7 +346,7 @@ static bool xt_osf_match_packet(const struct sk_buff *skb,
rcu_read_unlock
();
if
(
!
fcount
&&
(
info
->
flags
&
XT_OSF_LOG
))
nf_log_packet
(
p
->
hooknum
,
0
,
skb
,
p
->
in
,
p
->
out
,
NULL
,
nf_log_packet
(
p
->
family
,
p
->
hooknum
,
skb
,
p
->
in
,
p
->
out
,
NULL
,
"Remote OS is not known: %pi4:%u -> %pi4:%u
\n
"
,
&
ip
->
saddr
,
ntohs
(
tcp
->
source
),
&
ip
->
daddr
,
ntohs
(
tcp
->
dest
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录