[PATCH] block/bio: Remove null checks before mempool_destroy in bioset_free

2017-10-06 Thread Tim Hansen
This patch removes redundant checks for null values on bio_pool and bvec_pool. Found using make coccicheck M=block/ on linux-net tree on the next-20170929 tag. Related to patch 9987695 that removed similar checks in bio-integrity. Signed-off-by: Tim Hansen <devtimhan...@gmail.com> ---

Re: [PATCH] block: remove unnecessary NULL checks in bioset_integrity_free()

2017-10-06 Thread Tim Hansen
On Fri, Oct 06, 2017 at 01:04:25PM -0600, Jens Axboe wrote: > On 10/05/2017 12:09 PM, Tim Hansen wrote: > > mempool_destroy() already checks for a NULL value being passed in, this > > eliminates duplicate checks. > > > > This was caught by running make coccich

Re: [PATCH] block/bio: Remove null checks before mempool_destroy in bioset_free

2017-10-06 Thread Tim Hansen
On Fri, Oct 06, 2017 at 01:05:01PM -0600, Jens Axboe wrote: > On 10/06/2017 12:45 PM, Tim Hansen wrote: > > This patch removes redundant checks for null values on bio_pool and > > bvec_pool. > > > > Found using make coccicheck M=block/ on linux-net tree on

[PATCH] arch/x86: remove redundant null checks before kmem_cache_destroy

2017-10-07 Thread Tim Hansen
Remove redundant null checks before calling kmem_cache_destroy. Found with make coccicheck M=arch/x86/kvm on linux-next tag next-20170929. Signed-off-by: Tim Hansen <devtimhan...@gmail.com> --- arch/x86/kvm/mmu.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git

[PATCH] net/core: Fix BUG to BUG_ON conditionals.

2017-10-08 Thread Tim Hansen
Fix BUG() calls to use BUG_ON(conditional) macros. This was found using make coccicheck M=net/core on linux next tag next-20170929. Signed-off-by: Tim Hansen <devtimhan...@gmail.com> --- net/core/skbuff.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git

Re: [PATCH v2] net/core: Fix BUG to BUG_ON conditionals.

2017-10-08 Thread Tim Hansen
Mistakenly sent the patch previously with a missing semicolon. Apologies. Fix BUG() calls to use BUG_ON(conditional) macros. This was found using make coccicheck M=net/core on linux next tag next-20170929 Signed-off-by: Tim Hansen <devtimhan...@gmail.com> --- net/core/skbuff.

[PATCH v2] net/core: Fix BUG to BUG_ON conditionals.

2017-10-09 Thread Tim Hansen
Fix BUG() calls to use BUG_ON(conditional) macros. This was found using make coccicheck M=net/core on linux next tag next-2017092 Signed-off-by: Tim Hansen <devtimhan...@gmail.com> --- net/core/skbuff.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/ne

[PATCH] block: remove unnecessary NULL checks in bioset_integrity_free()

2017-10-05 Thread Tim Hansen
mempool_destroy() already checks for a NULL value being passed in, this eliminates duplicate checks. This was caught by running make coccicheck M=block/ on linus' tree on commit 77ede3a014a32746002f7889211f0cecf4803163 (current head as of this patch). Signed-off-by: Tim Hansen <devtim

[PATCH] kernel/softirq: use BUG_ON conditional instead of BUG in softirq.

2017-10-13 Thread Tim Hansen
Fix BUG() usage to BUG_ON(conditional) usage in softirq. Found with make coccicheck M=kernel/ on linux-next tag next-20171012. Signed-off-by: Tim Hansen <devtimhan...@gmail.com> --- kernel/softirq.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/kernel/sof

[PATCH] net/ipv4: Update sk_for_each_entry_offset_rcu macro to utilize rcu methods hlist_next_rcu. This fixes the warnings thrown by sparse regarding net/ipv4/udp.c on line 1974.

2017-09-26 Thread Tim Hansen
Signed-off-by: Tim Hansen <devtimhan...@gmail.com> --- include/net/sock.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/net/sock.h b/include/net/sock.h index aeeec62992ca..516289f6404b 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -732,10 +

Re: [PATCH] net/ipv4: Update sk_for_each_entry_offset_rcu macro to utilize rcu methods hlist_next_rcu. This fixes the warnings thrown by sparse regarding net/ipv4/udp.c on line 1974.

2017-09-27 Thread Tim Hansen
> Tue, Sep 26, 2017 at 08:03:39PM -0700, David Miller wrote: > From: Tim Hansen <devtimhan...@gmail.com> > Date: Tue, 26 Sep 2017 20:54:05 -0400 > > > Signed-off-by: Tim Hansen <devtimhan...@gmail.com> > > This is a poor patch submission on many levels. > Ap

[PATCH] net/ipv6: remove unused err variable on icmpv6_push_pending_frames

2017-10-05 Thread Tim Hansen
M=net/ipv6/ on linus' tree on commit 77ede3a014a32746002f7889211f0cecf4803163 (current HEAD as of this patch). Signed-off-by: Tim Hansen <devtimhan...@gmail.com> --- net/ipv6/icmp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c

[PATCH] net/ipv4: Remove unused variable in route.c

2017-10-04 Thread Tim Hansen
int rc is unmodified after initalization in net/ipv4/route.c, this patch simply cleans up that variable and returns 0. This was found with coccicheck M=net/ipv4/ on linus' tree. Signed-off-by: Tim Hansen <devtimhan...@gmail.com> --- net/ipv4/route.c | 3 +-- 1 file changed, 1 insertion

Re: [PATCH v2] net/sock: Update sk rcu iterator macro.

2017-10-23 Thread Tim Hansen
Mon, Oct 23, 2017 at 06:42:50PM +, Levin, Alexander (Sasha Levin) wrote: > On Mon, Oct 23, 2017 at 11:39:22AM -0400, Tim Hansen wrote: > >Mark hlist nodes in sk rcu iterator as protected by the rcu. > >hlist_next_rcu accomplishes this and silences the warnings > >spars

[PATCH v3] net/sock: Update sk rcu iterator macro.

2017-10-23 Thread Tim Hansen
Mark hlist node in sk rcu iterator as protected by the rcu. hlist_next_rcu accomplishes this and silences the warnings sparse throws. Found with make C=1 net/ipv4/udp.o on linux-next tag next-20171009. Signed-off-by: Tim Hansen <devtimhan...@gmail.com> --- include/net/sock.h | 4 ++--

[PATCH] net/netlabel: Add list_next_rcu() in rcu_dereference().

2017-11-16 Thread Tim Hansen
Add list_next_rcu() for fetching next list in rcu_deference safely. Found with sparse in linux-next tree on tag next-20171116. Signed-off-by: Tim Hansen <devtimhan...@gmail.com> --- net/netlabel/netlabel_addrlist.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH] fs: Safe rcu access to hlist.

2017-11-20 Thread Tim Hansen
On Sun, Nov 19, 2017 at 09:28:49PM +, Al Viro wrote: > On Sun, Nov 19, 2017 at 03:02:10PM -0500, Tim Hansen wrote: > > Adds hlist_first_rcu and hlist_next_rcu for safe access > > to the hlist in seq_hlist_next_rcu. > > > > Found on linux-next branch, ta

[PATCH] fs: Safe rcu access to hlist.

2017-11-19 Thread Tim Hansen
Adds hlist_first_rcu and hlist_next_rcu for safe access to the hlist in seq_hlist_next_rcu. Found on linux-next branch, tag next-20171117 with sparse. Signed-off-by: Tim Hansen <devtimhan...@gmail.com> --- fs/seq_file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --gi

Re: [PATCH] fs/xfs: Remove NULL check before kmem_cache_destroy

2017-11-08 Thread Tim Hansen
On Wed, Nov 08, 2017 at 01:53:10PM -0500, Tim Hansen wrote: > kmem_cache_destroy already checks for null values. > > Signed-off-by: Tim Hansen <devtimhan...@gmail.com> > --- > fs/xfs/kmem.h | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a

[PATCH] fs/xfs: Remove NULL check before kmem_cache_destroy

2017-11-08 Thread Tim Hansen
kmem_cache_destroy already checks for null values. Signed-off-by: Tim Hansen <devtimhan...@gmail.com> --- fs/xfs/kmem.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/xfs/kmem.h b/fs/xfs/kmem.h index 7509019..4b87472 100644 --- a/fs/xfs/kmem.h +++ b/fs/xfs/

[PATCH v2] net/sock: Update sk rcu iterator macro.

2017-10-23 Thread Tim Hansen
Mark hlist nodes in sk rcu iterator as protected by the rcu. hlist_next_rcu accomplishes this and silences the warnings sparse throws for net/ipv4/udp.c and net/ipv6/udp.c. Found with make C=1 net/ipv4/udp.o on linux-next tag next-20171009. Signed-off-by: Tim Hansen <devtimhan...@gmail.

[PATCH] block: remove unnecessary NULL checks in bioset_integrity_free()

2017-10-05 Thread Tim Hansen
mempool_destroy() already checks for a NULL value being passed in, this eliminates duplicate checks. This was caught by running make coccicheck M=block/ on linus' tree on commit 77ede3a014a32746002f7889211f0cecf4803163 (current head as of this patch). Signed-off-by: Tim Hansen --- block/bio

[PATCH] net/ipv6: remove unused err variable on icmpv6_push_pending_frames

2017-10-05 Thread Tim Hansen
M=net/ipv6/ on linus' tree on commit 77ede3a014a32746002f7889211f0cecf4803163 (current HEAD as of this patch). Signed-off-by: Tim Hansen --- net/ipv6/icmp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 5acb544..aeb49b4 100644

[PATCH] block/bio: Remove null checks before mempool_destroy in bioset_free

2017-10-06 Thread Tim Hansen
This patch removes redundant checks for null values on bio_pool and bvec_pool. Found using make coccicheck M=block/ on linux-net tree on the next-20170929 tag. Related to patch 9987695 that removed similar checks in bio-integrity. Signed-off-by: Tim Hansen --- block/bio.c | 7 ++- 1 file

Re: [PATCH] block: remove unnecessary NULL checks in bioset_integrity_free()

2017-10-06 Thread Tim Hansen
On Fri, Oct 06, 2017 at 01:04:25PM -0600, Jens Axboe wrote: > On 10/05/2017 12:09 PM, Tim Hansen wrote: > > mempool_destroy() already checks for a NULL value being passed in, this > > eliminates duplicate checks. > > > > This was caught by running make coccich

Re: [PATCH] block/bio: Remove null checks before mempool_destroy in bioset_free

2017-10-06 Thread Tim Hansen
On Fri, Oct 06, 2017 at 01:05:01PM -0600, Jens Axboe wrote: > On 10/06/2017 12:45 PM, Tim Hansen wrote: > > This patch removes redundant checks for null values on bio_pool and > > bvec_pool. > > > > Found using make coccicheck M=block/ on linux-net tree on

[PATCH] arch/x86: remove redundant null checks before kmem_cache_destroy

2017-10-07 Thread Tim Hansen
Remove redundant null checks before calling kmem_cache_destroy. Found with make coccicheck M=arch/x86/kvm on linux-next tag next-20170929. Signed-off-by: Tim Hansen --- arch/x86/kvm/mmu.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86

[PATCH] net/core: Fix BUG to BUG_ON conditionals.

2017-10-08 Thread Tim Hansen
Fix BUG() calls to use BUG_ON(conditional) macros. This was found using make coccicheck M=net/core on linux next tag next-20170929. Signed-off-by: Tim Hansen --- net/core/skbuff.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/net/core/skbuff.c b/net/core

Re: [PATCH v2] net/core: Fix BUG to BUG_ON conditionals.

2017-10-08 Thread Tim Hansen
Mistakenly sent the patch previously with a missing semicolon. Apologies. Fix BUG() calls to use BUG_ON(conditional) macros. This was found using make coccicheck M=net/core on linux next tag next-20170929 Signed-off-by: Tim Hansen --- net/core/skbuff.c | 15 ++- 1 file changed, 6

[PATCH] net/ipv4: Remove unused variable in route.c

2017-10-04 Thread Tim Hansen
int rc is unmodified after initalization in net/ipv4/route.c, this patch simply cleans up that variable and returns 0. This was found with coccicheck M=net/ipv4/ on linus' tree. Signed-off-by: Tim Hansen --- net/ipv4/route.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH] kernel/softirq: use BUG_ON conditional instead of BUG in softirq.

2017-10-13 Thread Tim Hansen
Fix BUG() usage to BUG_ON(conditional) usage in softirq. Found with make coccicheck M=kernel/ on linux-next tag next-20171012. Signed-off-by: Tim Hansen --- kernel/softirq.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/kernel/softirq.c b/kernel/softirq.c index

[PATCH] fs/xfs: Remove NULL check before kmem_cache_destroy

2017-11-08 Thread Tim Hansen
kmem_cache_destroy already checks for null values. Signed-off-by: Tim Hansen --- fs/xfs/kmem.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/xfs/kmem.h b/fs/xfs/kmem.h index 7509019..4b87472 100644 --- a/fs/xfs/kmem.h +++ b/fs/xfs/kmem.h @@ -119,8 +119,7

Re: [PATCH] fs/xfs: Remove NULL check before kmem_cache_destroy

2017-11-08 Thread Tim Hansen
On Wed, Nov 08, 2017 at 01:53:10PM -0500, Tim Hansen wrote: > kmem_cache_destroy already checks for null values. > > Signed-off-by: Tim Hansen > --- > fs/xfs/kmem.h | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/fs/xfs/kmem.h b/fs/xfs/kmem.h

[PATCH] fs: Safe rcu access to hlist.

2017-11-19 Thread Tim Hansen
Adds hlist_first_rcu and hlist_next_rcu for safe access to the hlist in seq_hlist_next_rcu. Found on linux-next branch, tag next-20171117 with sparse. Signed-off-by: Tim Hansen --- fs/seq_file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/seq_file.c b/fs

Re: [PATCH] fs: Safe rcu access to hlist.

2017-11-20 Thread Tim Hansen
On Sun, Nov 19, 2017 at 09:28:49PM +, Al Viro wrote: > On Sun, Nov 19, 2017 at 03:02:10PM -0500, Tim Hansen wrote: > > Adds hlist_first_rcu and hlist_next_rcu for safe access > > to the hlist in seq_hlist_next_rcu. > > > > Found on linux-next branch, ta

[PATCH v2] net/core: Fix BUG to BUG_ON conditionals.

2017-10-09 Thread Tim Hansen
Fix BUG() calls to use BUG_ON(conditional) macros. This was found using make coccicheck M=net/core on linux next tag next-2017092 Signed-off-by: Tim Hansen --- net/core/skbuff.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/net/core/skbuff.c b/net/core

[PATCH] net/ipv4: Update sk_for_each_entry_offset_rcu macro to utilize rcu methods hlist_next_rcu. This fixes the warnings thrown by sparse regarding net/ipv4/udp.c on line 1974.

2017-09-26 Thread Tim Hansen
Signed-off-by: Tim Hansen --- include/net/sock.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/net/sock.h b/include/net/sock.h index aeeec62992ca..516289f6404b 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -732,10 +732,10 @@ static inline void

Re: [PATCH] net/ipv4: Update sk_for_each_entry_offset_rcu macro to utilize rcu methods hlist_next_rcu. This fixes the warnings thrown by sparse regarding net/ipv4/udp.c on line 1974.

2017-09-27 Thread Tim Hansen
> Tue, Sep 26, 2017 at 08:03:39PM -0700, David Miller wrote: > From: Tim Hansen > Date: Tue, 26 Sep 2017 20:54:05 -0400 > > > Signed-off-by: Tim Hansen > > This is a poor patch submission on many levels. > Apologies Dave, this is my first patch. I appreciate th

[PATCH] net/netlabel: Add list_next_rcu() in rcu_dereference().

2017-11-16 Thread Tim Hansen
Add list_next_rcu() for fetching next list in rcu_deference safely. Found with sparse in linux-next tree on tag next-20171116. Signed-off-by: Tim Hansen --- net/netlabel/netlabel_addrlist.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/netlabel/netlabel_addrlist.h

[PATCH v2] net/sock: Update sk rcu iterator macro.

2017-10-23 Thread Tim Hansen
Mark hlist nodes in sk rcu iterator as protected by the rcu. hlist_next_rcu accomplishes this and silences the warnings sparse throws for net/ipv4/udp.c and net/ipv6/udp.c. Found with make C=1 net/ipv4/udp.o on linux-next tag next-20171009. Signed-off-by: Tim Hansen --- include/net/sock.h | 4

[PATCH v3] net/sock: Update sk rcu iterator macro.

2017-10-23 Thread Tim Hansen
Mark hlist node in sk rcu iterator as protected by the rcu. hlist_next_rcu accomplishes this and silences the warnings sparse throws. Found with make C=1 net/ipv4/udp.o on linux-next tag next-20171009. Signed-off-by: Tim Hansen --- include/net/sock.h | 4 ++-- 1 file changed, 2 insertions

Re: [PATCH v2] net/sock: Update sk rcu iterator macro.

2017-10-23 Thread Tim Hansen
Mon, Oct 23, 2017 at 06:42:50PM +, Levin, Alexander (Sasha Levin) wrote: > On Mon, Oct 23, 2017 at 11:39:22AM -0400, Tim Hansen wrote: > >Mark hlist nodes in sk rcu iterator as protected by the rcu. > >hlist_next_rcu accomplishes this and silences the warnings > >spars