Hi Pablo,
2017-03-21 22:57 GMT+08:00 Pablo Neira Ayuso :
> We only allow runtime updates of expectation policies for timeout and
> maximum number of expectations, otherwise reject the update.
>
> Signed-off-by: Pablo Neira Ayuso
> ---
> v3: Fixed expect_class_max semantics. Compile-tested only.
From: Gao Feng
When invoke __nf_conntrack_helper_find, it needs the rcu lock to
protect the helper module which would not be unloaded.
Now there are two caller nf_conntrack_helper_try_module_get and
ctnetlink_create_expect which don't hold rcu lock. And the other
callers left like ctnetlink_chan
Hi Pablo,
> -Original Message-
> From: netfilter-devel-ow...@vger.kernel.org
> [mailto:netfilter-devel-ow...@vger.kernel.org] On Behalf Of Gao Feng
> Sent: Wednesday, March 22, 2017 9:37 AM
> To: pa...@netfilter.org; netfilter-devel@vger.kernel.org
> Cc: 'Gao Feng'
> Subject: RE: [PATCH R
Hi Pablo,
On chromebook kevin:
Tested-by: Jeffy Chen
On 03/21/2017 08:41 PM, Pablo Neira Ayuso wrote:
From: Jeffy Chen
We have memory leaks of nf_conntrack_helper & expect_policy.
Signed-off-by: Jeffy Chen
Signed-off-by: Pablo Neira Ayuso
---
Heavily based on your original patch, so I'm k
From: Gao Feng
Because these two functions return the nf_ct_helper_expectfn pointer
which should be protected by rcu lock. So it should makes sure the
caller should hold the rcu lock, not inside these functions.
Signed-off-by: Gao Feng
---
v2: Shorter subject, per Pablo
v1: Initial version
Since kernel commit 00590fdd5be0 ("netfilter: ipset: Introduce RCU
locking in list type"), the parameter 'size' has not been in use and
is ignored by the kernel. This is not very apparent to the user. This
commit makes 'size' optional and also warns the user if they try to
specify it. We also don't
Warnings are only printed out for IPSET_CMD_TEST. The user won't see
warnings from other commands.
Reviewed-by: Josh Hunt
Signed-off-by: Vishwanath Pai
---
src/ipset.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/ipset.c b/src/ipset.c
index 2c4fa10..b0bef7b 100644
Revision 4 warns the users that the parameter 'size' is ignored. The
kernel module doesn't need any changes, it will work with both the
revisions.
Note that this will not restore old behavior before commit 00590fdd5be0
("netfilter: ipset: Introduce RCU locking in list type") for users of
the older
Hi Pablo,
> -Original Message-
> From: netfilter-devel-ow...@vger.kernel.org
> [mailto:netfilter-devel-ow...@vger.kernel.org] On Behalf Of
> gfree.w...@foxmail.com
> Sent: Wednesday, March 22, 2017 9:25 AM
> To: pa...@netfilter.org; netfilter-devel@vger.kernel.org;
> gfree.w...@foxmail.com
From: Gao Feng
There is no rcu_read_lock during ctlink gets the helper and inserts the
expectation. So there is one possible use-after-free issue when unload
the helper module.
For example:
CPU1CPU2
ctlink gets the helper
helpe
From: Gao Feng
It is possible that invoke one expectfn whose module is already unloaded.
These two patches are used to fix it.
Gao Feng (2):
netfilter: helper: Rename struct nf_ct_helper_expectfn to
nf_ct_nat_helper
netfilter: helper: Fix possible panic caused by invoking expectfn
un
From: Gao Feng
Rename struct nf_ct_helper_expectfn to nf_ct_nat_helper, and rename
other functions or variables which refer to it.
The new name is better than the old one.
Signed-off-by: Gao Feng
---
v3: Rename the nf_ct_helper_expectfn, func, and member, per Pablo,
v2: Use the module as the
From: Gao Feng
Because the conntrack NAT module could be rmmod anytime, so we should
really leave things in clean state if such thing happens and make sure
we don't leave any packet running over code that will be gone after
the removal.
We only removed the expectations when unregister conntrack
Not having a space between the last element in a set and the closing
curly brace looks ugly, so add it here.
This also adjusts all shell testcases as they match whitespace in nft
output and therefore fail otherwise.
Signed-off-by: Phil Sutter
---
src/expression.c
If rule set applying failed, this would leave a stray netns in place.
Interestingly, this situation led to other, seemingly unrelated
testcases to fail with spurious errors, e.g. sets/0015rulesetflush_0:
| $ ./run-tests.sh testcases/sets/0015rulesetflush_0
| I: using nft binary ../../src/nft
|
|
This makes sure nesting of anonymous sets works regardless of whether
defines are used or not. As a side-effect, it also checks that overlap
checking when IP address prefixes are used, works.
Signed-off-by: Phil Sutter
---
tests/py/ip/sets.t | 4 +++
tests/py/ip/sets.t.pay
2017-03-21 23:26 GMT+08:00 Pablo Neira Ayuso :
[...]
>>
>> After I have a closer look, I find that we do not support netns for the
>> nfct_helper currently. So this possible_net_t field is not necessary for
>> the time being.
>
> Oh, I see. This is probably one of the remaining subsystems not havin
On Tue, 21 Mar 2017 23:28:45 +0100
Linus Lüssing wrote:
> However, the IP code drops it in the beginning of ip_input.c/ip_rcv()
> as the dnat target did not update the skb->pkt_type. If after
> dnat'ing the packet is now destined to us then the skb->pkt_type
> needs to be updated from PACKET_OTHE
When trying to redirect bridged frames to the bridge device itself
via the ebtables nat-prerouting chain and the dnat target then this
currently fails:
The ethernet destination of the frame is dnat'ed to the MAC address of
the bridge itself just fine and the correctly altered frame can even
be cap
From: Pablo Neira Ayuso
Date: Mon, 20 Mar 2017 11:08:28 +0100
> The following patchset contains Netfilter/IPVS updates for your
> net-next tree. A couple of new features for nf_tables, and unsorted
> cleanups and incremental updates for the Netfilter tree. More
> specifically, they are:
...
> Yo
On some architecture, ulogd is not starting due to a
crash in memcpy. This patch switches to strncpy to
avoid the problem.
Reported-by: Alexandru Ardelean
Signed-off-by: Eric Leblond
---
src/ulogd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ulogd.c b/src/ulogd.c
in
Hello,
Thanks for the report and the patch. I'm not sure of your
implementation. Can you test with the patch to follow ?
On Mon, 2017-03-20 at 10:31 +0200, Alexandru Ardelean wrote:
> This is a bit zealous to fix like this, but it seems to work.
>
> The crash was reproduced on ppc32, with GCC 5.
nft add rule ip6 f i meta l4proto ipv6-icmp icmpv6 type nd-router-advert
:1:50-60: Error: conflicting protocols specified: unknown vs. icmpv6
add icmpv6 to nexthdr list so base gets updated correctly.
Reported-by: Thomas Woerner
Signed-off-by: Florian Westphal
---
NB: This is STILL not correct
Uses new netmask support added in previous commit to allow user to
specify cidr, netmask, or wildcard mask as arguments to the netmask
parameter at creation time.
Signed-off-by: Josh Hunt
---
lib/ipset_hash_ip.c | 166
1 file changed, 166 inse
Adds netmask support to hash:ipport sets.
Signed-off-by: Josh Hunt
---
lib/ipset_hash_ipport.c | 194
1 file changed, 194 insertions(+)
diff --git a/lib/ipset_hash_ipport.c b/lib/ipset_hash_ipport.c
index 2166922..a2cf79e 100644
--- a/lib/ipset_h
Adds netmask to hash:ip,port create options, describe how it works, and
provide examples.
Signed-off-by: Josh Hunt
---
src/ipset.8 | 47 ++-
1 file changed, 46 insertions(+), 1 deletion(-)
diff --git a/src/ipset.8 b/src/ipset.8
index 56cc9ea..d0ca810
These are the userspace changes to add the ability to specify a netmask
or wildcard mask for the set during creation instead of just a cidr
value.
Example usage:
Legacy behavior:
ipset create foo hash:ip family inet6 netmask 64
New netmask support (equivalent to legacy example):
ipset create foo
Updates hash:ip create options to list new mask param to netmask,
describe how it works, and provide examples.
Signed-off-by: Josh Hunt
---
src/ipset.8 | 43 ---
1 file changed, 36 insertions(+), 7 deletions(-)
diff --git a/src/ipset.8 b/src/ipset.8
index
Convert netmask to store cidr and netmask.
Signed-off-by: Josh Hunt
---
include/libipset/data.h | 5 ++-
include/libipset/linux_ip_set.h | 5 +++
include/libipset/print.h| 3 ++
lib/data.c | 25 +--
lib/debug.c | 1 +
lib/p
Currently netmasks at set creation, for those sets which have support for it,
are
limited to cidr values. This patch set extends that to also allow for
conventional netmask values and wildcard masks. We have found numerous
uses for wildcard masks and have this support deployed on our network.
Thi
Enable new netmask suport for hash:ip set types.
Example usage:
Legacy behavior:
ipset create foo hash:ip family inet6 netmask 64
New netmask support (equivalent to legacy example):
ipset create foo hash:ip family inet6 netmask :::::
New wildcard mask support:
ipset create foo h
Adds new helper function to be used for ipset nf_inet_addr netmask support.
Signed-off-by: Josh Hunt
---
include/linux/netfilter.h | 9 +
1 file changed, 9 insertions(+)
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index a4b97be..4218969 100644
--- a/include/linux
Initial netmask support for hash:ipport set types.
Signed-off-by: Josh Hunt
---
net/netfilter/ipset/ip_set_hash_ipport.c | 29 -
1 file changed, 28 insertions(+), 1 deletion(-)
diff --git a/net/netfilter/ipset/ip_set_hash_ipport.c
b/net/netfilter/ipset/ip_set_hash_i
Extends ipset netmask support to handle both cidr values and full
netmasks. As part of that it now supports wildcard masks allowing the
user to mask out any bits of an address. This commit provides the
infrastructure to specify netmasks of these types for hash sets of
both v4 and v6 addressees.
Fo
Hello!
On 03/21/2017 04:23 PM, simran singhal wrote:
Simplify function returns by merging assignment and return into
one command line.
You mean "one statement"?
Signed-off-by: simran singhal
---
--This is my contribution to the netfilter project of
Outreachy Round 14.
net/netfilt
On Tue, Mar 21, 2017 at 11:19:11PM +0800, Liping Zhang wrote:
> Hi Pablo,
>
> 2017-03-21 22:48 GMT+08:00 Liping Zhang :
> > 2017-03-21 18:33 GMT+08:00 Pablo Neira Ayuso :
> >>> +struct nfnl_cthelper {
> >>> + struct list_headlist;
> >>> + struct nf_conntrack_helper *he
The tech committee would like to announce two new accepted talks.
The first one is a talk on container based network emulators by
Brian Linkletter and the second one is by Willem de Bruijn
on zero copy sendmsg.
Details are as follows:
1) Investigating Linux Network Behaviour Using Open-Source N
Hi Pablo,
2017-03-21 22:48 GMT+08:00 Liping Zhang :
> 2017-03-21 18:33 GMT+08:00 Pablo Neira Ayuso :
>>> +struct nfnl_cthelper {
>>> + struct list_headlist;
>>> + struct nf_conntrack_helper *helper;
>>> +};
>>> +
>>> +static LIST_HEAD(nfnl_cthelper_list);
>>
>> We need
We only allow runtime updates of expectation policies for timeout and
maximum number of expectations, otherwise reject the update.
Signed-off-by: Pablo Neira Ayuso
---
v3: Fixed expect_class_max semantics. Compile-tested only.
net/netfilter/nfnetlink_cthelper.c | 86
On Tue, Mar 21, 2017 at 11:00:02PM +0800, Liping Zhang wrote:
> Hi Pablo,
>
> 2017-03-21 18:34 GMT+08:00 Pablo Neira Ayuso :
> > On Sun, Mar 19, 2017 at 10:36:00PM +0800, Liping Zhang wrote:
> >> From: Liping Zhang
> >>
> >> So we can modify the nf_conntrack_expect_policy directly, the next patch
Hi Pablo,
2017-03-21 18:34 GMT+08:00 Pablo Neira Ayuso :
> On Sun, Mar 19, 2017 at 10:36:00PM +0800, Liping Zhang wrote:
>> From: Liping Zhang
>>
>> So we can modify the nf_conntrack_expect_policy directly, the next patch
>> will need this.
>
> I'm missing why you need this.
Because I want to mo
On Tue, Mar 21, 2017 at 10:35:43PM +0800, Liping Zhang wrote:
> Hi Pablo,
>
> 2017-03-21 18:27 GMT+08:00 Pablo Neira Ayuso :
> [...]
> >> + class_max = ntohl(nla_get_be32(tb[NFCTH_POLICY_SET_NUM]));
> >> + if (class_max == 0)
> >> + return -EINVAL;
> >
> > I think this patch is
2017-03-21 18:33 GMT+08:00 Pablo Neira Ayuso :
> On Sun, Mar 19, 2017 at 10:36:02PM +0800, Liping Zhang wrote:
>> From: Liping Zhang
>>
>> The nf_ct_helper_hash table is protected by nf_ct_helper_mutex, while
>> nfct_helper operation is protected by nfnl_lock(NFNL_SUBSYS_CTHELPER).
>> So it's poss
Hi Pablo,
> -Original Message-
> From: Pablo Neira Ayuso [mailto:pa...@netfilter.org]
> Sent: Tuesday, March 21, 2017 10:30 PM
> To: f...@ikuai8.com
> Cc: netfilter-devel@vger.kernel.org; gfree.w...@gmail.com
> Subject: Re: [PATCH net-next 1/1] netfilter: helper: Remove the rcu lock
in
> n
Hi Pablo,
2017-03-21 18:27 GMT+08:00 Pablo Neira Ayuso :
[...]
>> + class_max = ntohl(nla_get_be32(tb[NFCTH_POLICY_SET_NUM]));
>> + if (class_max == 0)
>> + return -EINVAL;
>
> I think this patch is just fixing up this case. We should always
> provide a policy for the expectati
On Mon, Mar 20, 2017 at 01:33:33PM +0100, Oliver Schröder wrote:
> Hi list,
>
> inspired by the 'packet-tracer' cli-command of cisco ASAs I have
> implemented a linux application with the same functionality. For those
> of you who are not familiar with the command, please read up at lpt's
> homepa
Hi Pablo,
> -Original Message-
> From: netfilter-devel-ow...@vger.kernel.org
> [mailto:netfilter-devel-ow...@vger.kernel.org] On Behalf Of Pablo Neira
Ayuso
> Sent: Tuesday, March 21, 2017 10:13 PM
> To: f...@ikuai8.com
> Cc: netfilter-devel@vger.kernel.org; gfree_w...@126.com
> Subject: R
On Tue, Mar 14, 2017 at 04:29:05PM +0800, f...@ikuai8.com wrote:
> From: Gao Feng
>
> Because these two functions return the nf_ct_helper_expectfn pointer
> which should be protected by rcu lock. So it should makes sure the
> caller should hold the rcu lock, not inside these functions.
>
> Signe
Hi Pablo,
2017-03-21 18:18 GMT+08:00 Pablo Neira Ayuso :
> On Sun, Mar 19, 2017 at 10:35:58PM +0800, Liping Zhang wrote:
>> From: Liping Zhang
>>
>> Currently, when we create cthelper via nfnetlink, -EINVAL will be
>> returned if the NFCTH_PRIV_DATA_LEN attribute is empty.
>>
>> But enforcing the
On Tue, Mar 21, 2017 at 02:06:26PM +0800, f...@ikuai8.com wrote:
> From: Gao Feng
>
> Because the conntrack NAT module could be rmmod anytime, so we should
> really leave things in clean state if such thing happens and make sure
> we don't leave any packet running over code that will be gone afte
On Thu, Mar 16, 2017 at 04:55:02PM +0900, Lorenzo Colitti wrote:
> Currently, ip[6]tables-restore does not perform any locking, so it
> is not safe to use concurrently with ip[6]tables.
>
> This patch makes ip[6]tables-restore wait for the lock if -w
> was specified. Arguments to -w and -W are sup
Simplify function returns by merging assignment and return into one
command line.
Signed-off-by: simran singhal
---
--This is my contribution to the netfilter project of
Outreachy Round 14.
net/netfilter/ipset/ip_set_list_set.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
dif
Simplify function returns by merging assignment and return into
one command line.
Signed-off-by: simran singhal
---
--This is my contribution to the netfilter project of
Outreachy Round 14.
net/netfilter/ipvs/ip_vs_ftp.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git
This patch series Simplify function returns by merging
assignment and return into one command line.
v2:
-Change the subject of cover patch
simran singhal (2):
netfilter: ipset: Compress return logic
netfilter: ipvs: Compress return logic
net/netfilter/ipset/ip_set_list_set.c | 5 +
ne
On Mon, Mar 20, 2017 at 05:38:54PM +0100, Phil Sutter wrote:
> This series fixes a number of issues with nested anonymous sets.
Series applied.
Phil, I'd appreciate if you can follow up with a patch that adds
tests/shell to cover this fix. Thanks.
--
To unsubscribe from this list: send the line "
We only allow runtime updates of expectation policies for timeout and
maximum number of expectations, otherwise reject the update.
Signed-off-by: Pablo Neira Ayuso
---
v2: While at this, make sure we don't break atomicity in case of malformed
netlink attributes. So we fully apply the policy u
Simplify function returns by merging assignment and return into one
command line.
Signed-off-by: simran singhal
---
--This is my contribution to the netfilter project of
Outreachy Round 14.
net/netfilter/ipset/ip_set_list_set.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
di
Simplify function returns by merging assignment and return into
one command line.
Signed-off-by: simran singhal
---
--This is my contribution to the netfilter project of
Outreachy Round 14.
net/netfilter/ipvs/ip_vs_ftp.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git
On Tue, Mar 21, 2017 at 11:32:08AM +0100, Pablo Neira Ayuso wrote:
> On Sun, Mar 19, 2017 at 10:36:01PM +0800, Liping Zhang wrote:
> > From: Liping Zhang
> >
> > When invoke nfnl_cthelper_update, we will malloc a new expect_policy,
> > then only point the helper->expect_policy to the new one but
This patch series Simplify function returns by merging
assignment and return into one command line.
simran singhal (2):
netfilter: ipset: Compress return logic
netfilter: ipvs: Compress return logic
net/netfilter/ipset/ip_set_list_set.c | 5 +
net/netfilter/ipvs/ip_vs_ftp.c| 5 +
From: Jeffy Chen
We have memory leaks of nf_conntrack_helper & expect_policy.
Signed-off-by: Jeffy Chen
Signed-off-by: Pablo Neira Ayuso
---
Heavily based on your original patch, so I'm keeping you as original author
for this fix.
net/netfilter/nfnetlink_cthelper.c | 12 +---
1 file
We only allow runtime updates of expectation policies for timeout and
maximum number of expectations, otherwise reject the update.
Signed-off-by: Pablo Neira Ayuso
---
net/netfilter/nfnetlink_cthelper.c | 68 --
1 file changed, 66 insertions(+), 2 deletions(-)
The following Coccinelle script was used to detect this:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x)[...]
|
((T*)x)->f
|
- (T*)
e
)
Signed-off-by: simran singhal
---
--This is my contribution to the netfilter project of
Outreachy Round 14.
net/netfi
The following Coccinelle script was used to detect this:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x)[...]
|
((T*)x)->f
|
- (T*)
e
)
Signed-off-by: simran singhal
---
--This is my contribution to the netfilter project of
Outreachy Round 14.
net/netfi
This patch series remove unnecessary cast on void pointer.
simran singhal (2):
netfilter: ipset: Remove unnecessary cast on void pointer
netfilter: Remove unnecessary cast on void pointer
net/netfilter/ipset/ip_set_bitmap_gen.h | 4 ++--
net/netfilter/ipset/ip_set_core.c | 2 +-
net/
On Tue, Mar 21, 2017 at 03:07:10PM +0800, Jeffy Chen wrote:
> We have memory leaks of nf_conntrack_helper & expect_policy.
>
> Signed-off-by: Jeffy Chen
> ---
>
> net/netfilter/nfnetlink_cthelper.c | 7 +++
> 1 file changed, 7 insertions(+)
>
> diff --git a/net/netfilter/nfnetlink_cthelper
On Tue, Mar 21, 2017 at 03:07:10PM +0800, Jeffy Chen wrote:
> We have memory leaks of nf_conntrack_helper & expect_policy.
Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at ht
On Sun, Mar 19, 2017 at 10:01:10PM +0800, Liping Zhang wrote:
> From: Liping Zhang
>
> After inputting the following test command, core dump happened:
> # ./examples/nfct-helper-add test 1
> *** Error in
> `.../libnetfilter_cthelper/examples/.libs/lt-nfct-helper-add':
> double free or corr
On Sun, Mar 19, 2017 at 10:35:59PM +0800, Liping Zhang wrote:
> From: Liping Zhang
>
> The helper->expect_class_max must be set to the total number of
> expect_policy minus 1, since we will use the statement "if (class >
> helper->expect_class_max)" to validate the CTA_EXPECT_CLASS attr in
> ctne
On Sun, Mar 19, 2017 at 10:36:00PM +0800, Liping Zhang wrote:
> From: Liping Zhang
>
> So we can modify the nf_conntrack_expect_policy directly, the next patch
> will need this.
I'm missing why you need this.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the bo
On Sun, Mar 19, 2017 at 10:36:02PM +0800, Liping Zhang wrote:
> From: Liping Zhang
>
> The nf_ct_helper_hash table is protected by nf_ct_helper_mutex, while
> nfct_helper operation is protected by nfnl_lock(NFNL_SUBSYS_CTHELPER).
> So it's possible that one CPU is walking the nf_ct_helper_hash fo
On Sun, Mar 19, 2017 at 10:36:01PM +0800, Liping Zhang wrote:
> From: Liping Zhang
>
> When invoke nfnl_cthelper_update, we will malloc a new expect_policy,
> then only point the helper->expect_policy to the new one but ignore
> the old one, so it will be leaked forever.
>
> Another issue is tha
On Tue, Mar 21, 2017 at 01:09:47AM +0100, Linus Lüssing wrote:
> On Sun, Mar 19, 2017 at 05:55:06PM +0100, Linus Lüssing wrote:
> > On Fri, Mar 17, 2017 at 02:10:44PM +0100, Pablo Neira Ayuso wrote:
> > > Wait.
> > >
> > > May this break local multicast listener that are bound to the bridge
> > >
On Sun, Mar 19, 2017 at 10:35:58PM +0800, Liping Zhang wrote:
> From: Liping Zhang
>
> Currently, when we create cthelper via nfnetlink, -EINVAL will be
> returned if the NFCTH_PRIV_DATA_LEN attribute is empty.
>
> But enforcing the user to specify the NFCTH_PRIV_DATA_LEN attr seems
> unnecessar
Some functions like kmalloc/kzalloc return NULL on failure. When NULL
represents failure, !x is commonly used.
This was done using Coccinelle:
@@
expression *e;
identifier l1;
@@
e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...);
...
- e == NULL
+ !e
Signed-off-by: simran singhal
---
--This
Some functions like kmalloc/kzalloc return NULL on failure. When NULL
represents failure, !x is commonly used.
@@
expression *e;
identifier l1;
@@
e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...);
...
- e == NULL
+ !e
Signed-off-by: simran singhal
---
--This is my contribution to the netf
Some functions like kmalloc/kzalloc return NULL on failure. When NULL
represents failure, !x is commonly used.
This was done using Coccinelle:
@@
expression *e;
identifier l1;
@@
e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...);
...
- e == NULL
+ !e
Signed-off-by: simran singhal
---
--This
Some functions like kmalloc/kzalloc return NULL on failure. When NULL
represents failure, !x is commonly used.
This was done using Coccinelle:
@@
expression *e;
identifier l1;
@@
e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...);
...
- e == NULL
+ !e
Signed-off-by: simran singhal
---
--This
Some functions like kmalloc/kzalloc return NULL on failure. When NULL
represents failure, !x is commonly used.
This was done using Coccinelle:
@@
expression *e;
identifier l1;
@@
e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...);
...
- e == NULL
+ !e
Signed-off-by: simran singhal
---
--This
This patch series clean up tests if NULL returned on failure.
simran singhal (5):
netfilter: ipvs: Clean up tests if NULL returned on failure
netfilter: Clean up tests if NULL returned on failure
netfilter: nf_tables_api: Clean up tests if NULL returned on failure
netfilter: nfnetlink: Cle
80 matches
Mail list logo