[PATCH 1/2] x86_64: Add safe check in a.out loaders and some coding style

2013-09-17 Thread Geyslan G. Bem
inked with a cross-compiled ld. Signed-off-by: Geyslan G. Bem --- arch/x86/ia32/ia32_aout.c | 26 +++--- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/arch/x86/ia32/ia32_aout.c b/arch/x86/ia32/ia32_aout.c index bae3aba..15a8319 100644 --- a/arch/x86

[PATCH 2/2] x86: Useless inode var and Coding style fixes

2013-09-17 Thread Geyslan G. Bem
ith a cross-compiled ld. Signed-off-by: Geyslan G. Bem --- fs/binfmt_aout.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c index 89dec7f..a4af504 100644 --- a/fs/binfmt_aout.c +++ b/fs/binfmt_aout.c @@ -142,7 +142,8 @@ s

[PATCH 2/2] x86: Useless inode var and Coding style fixes

2013-09-17 Thread Geyslan G. Bem
ith a cross-compiled ld. Signed-off-by: Geyslan G. Bem --- fs/binfmt_aout.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c index 89dec7f..a4af504 100644 --- a/fs/binfmt_aout.c +++ b/fs/binfmt_aout.c @@ -142,7 +142,8 @@ s

[PATCH 1/2] x86_64: Add safe check in a.out loaders and some coding style

2013-09-17 Thread Geyslan G. Bem
inked with a cross-compiled ld. Signed-off-by: Geyslan G. Bem --- arch/x86/ia32/ia32_aout.c | 26 +++--- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/arch/x86/ia32/ia32_aout.c b/arch/x86/ia32/ia32_aout.c index bae3aba..15a8319 100644 --- a/arch/x86

[PATCH 02/02] x86_64: Add safe check in a.out loaders and some coding style

2013-09-18 Thread Geyslan G. Bem
ith a cross-compiled ld. Signed-off-by: Geyslan G. Bem --- arch/x86/ia32/ia32_aout.c | 25 ++--- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/arch/x86/ia32/ia32_aout.c b/arch/x86/ia32/ia32_aout.c index 15a8319..46a0346 100644 --- a/arch/x86/ia32/ia32_aout.c

[PATCH 01/02] x86: Useless inode var, printks and coding style fixes

2013-09-18 Thread Geyslan G. Bem
ith a cross-compiled ld. Signed-off-by: Geyslan G. Bem --- fs/binfmt_aout.c | 41 ++--- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c index 89dec7f..2307467 100644 --- a/fs/binfmt_aout.c +++ b/fs/binfmt_a

[PATCH 2/2] x86_64: Add safe check in a.out loaders and some coding style

2013-09-18 Thread Geyslan G. Bem
ith a cross-compiled ld. Signed-off-by: Geyslan G. Bem --- arch/x86/ia32/ia32_aout.c | 51 +++ 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/arch/x86/ia32/ia32_aout.c b/arch/x86/ia32/ia32_aout.c index bae3aba..a5f3e66 100644 --- a/arc

[PATCH v2 2/2] ia32_aout: x86_64: Add safe check in a.out loaders, printks, conding style fixes

2013-09-19 Thread Geyslan G. Bem
and a a.out linked with a cross-compiled ld. Signed-off-by: Geyslan G. Bem --- arch/x86/ia32/ia32_aout.c | 63 +++ 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/arch/x86/ia32/ia32_aout.c b/arch/x86/ia32/ia32_aout.c index bae3aba..87

[PATCH v2 1/2] binfmt_aout: x86: Useless inode var, printks coding style fixes

2013-09-19 Thread Geyslan G. Bem
a.out linked with a cross-compiled ld. Signed-off-by: Geyslan G. Bem --- fs/binfmt_aout.c | 98 +++- 1 file changed, 48 insertions(+), 50 deletions(-) diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c index 89dec7f..c732b8e 100644 ---

[PATCH v3 2/2] ia32_aout: x86_64: Add safe check in a.out loaders, printks, conding style fixes

2013-09-19 Thread Geyslan G. Bem
nd an a.out linked with a cross-compiled ld. Signed-off-by: Geyslan G. Bem --- arch/x86/ia32/ia32_aout.c | 63 +++ 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/arch/x86/ia32/ia32_aout.c b/arch/x86/ia32/ia32_aout.c index bae3aba..87

[PATCH v3 1/2] binfmt_aout: x86: Useless inode var, printks coding style fixes

2013-09-19 Thread Geyslan G. Bem
nd an a.out linked with a cross-compiled ld. Signed-off-by: Geyslan G. Bem --- fs/binfmt_aout.c | 98 +++- 1 file changed, 48 insertions(+), 50 deletions(-) diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c index 89dec7f..c732b8e 100644 ---

[PATCH] drm: nouveau: fix nvbe leakage

2013-10-07 Thread Geyslan G. Bem
Free memory allocated to nvbe when returning NULL. Signed-off-by: Geyslan G. Bem --- drivers/gpu/drm/nouveau/nouveau_sgdma.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nouveau_sgdma.c b/drivers/gpu/drm/nouveau/nouveau_sgdma.c index 0843ebc..af8b66d 100644

[PATCH] x86: mkpiggy.c: fix resource leakage

2013-10-07 Thread Geyslan G. Bem
Even though the resource is released when the application is closed or when returned from main function, modified to make it in accordance. Now FILE pointer is always verified. Signed-off-by: Geyslan G. Bem --- arch/x86/boot/compressed/mkpiggy.c | 16 ++-- 1 file changed, 10

[PATCH] dma: edma.c: remove edma_desc leakage

2013-10-07 Thread Geyslan G. Bem
Free memory allocated to edma_desc when failing to allocate slot. Signed-off-by: Geyslan G. Bem --- drivers/dma/edma.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index ff50ff4..3aab605 100644 --- a/drivers/dma/edma.c +++ b/drivers/dma/edma.c

[PATCH] 9p: unsigned/signed wrap in p9/unix modes.

2013-10-07 Thread Geyslan G. Bem
Changes the sign type to unsigned, avoiding the possibility of wrap when ORing the p9 or unix bit modes. Signed-off-by: Geyslan G. Bem --- fs/9p/vfs_inode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index b352457..574095e

[PATCH] btrfs: Fix memory leakage in the tree-log.c

2013-10-09 Thread Geyslan G. Bem
In some cases, add_inode_ref() is returning without freeing the 'name' pointer. Added bail out to explicitly call kfree when necessary. Signed-off-by: Geyslan G. Bem --- fs/btrfs/tree-log.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/tr

[PATCH v2] btrfs: Fix memory leakage in the tree-log.c

2013-10-09 Thread Geyslan G. Bem
In some cases, add_inode_ref() is returning without freeing the 'name' pointer. Added bail out to explicitly call kfree when necessary. Signed-off-by: Geyslan G. Bem --- fs/btrfs/tree-log.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/tree-

[PATCH v3] btrfs: Fix memory leakage in the tree-log.c

2013-10-09 Thread Geyslan G. Bem
In some cases, add_inode_ref() is returning without freeing the 'name' pointer. Added bail out to explicitly call kfree when necessary. Signed-off-by: Geyslan G. Bem --- fs/btrfs/tree-log.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/tree-

[PATCH v4] btrfs: Fix memory leakage in the tree-log.c

2013-10-09 Thread Geyslan G. Bem
When 'dir' is NULL, after calling extref_get_fields(), add_inode_ref() can be returning without freeing the 'name' pointer. Added kfree when necessary. Signed-off-by: Geyslan G. Bem --- fs/btrfs/tree-log.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff -

[PATCH v5] btrfs: Fix memory leakage in the tree-log.c

2013-10-10 Thread Geyslan G. Bem
In add_inode_ref() function: Initializes local pointers. Reduces the logical condition with the __add_inode_ref() return value by using only one 'goto out'. Centralizes the exiting, ensuring the freeing of all used memory. Signed-off-by: Geyslan G. Bem --- fs/btrfs/tree-

[PATCH 1/1] fs/binfmt_elf.c: fill_note_info: Reduce scope of a variable

2013-09-27 Thread Geyslan G. Bem
The *t variable in the fill_note_info function is only used if siginfo->si_signo isn't 0. Moving "t" pointer to that inner scope. Tested. Signed-off-by: Geyslan G. Bem --- fs/binfmt_elf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/binfmt_elf.c

[PATCH] 9p: remove unused 'p9_fid' struct pointer

2013-09-28 Thread Geyslan G. Bem
Get rid of the useless '*fid' variable. Signed-off-by: Geyslan G. Bem --- fs/9p/cache.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/9p/cache.c b/fs/9p/cache.c index a9ea73d..50f9d9c 100644 --- a/fs/9p/cache.c +++ b/fs/9p/cache.c @@ -239,13 +239,

[PATCH] 9p: remove unused 'p9_client' struct pointer

2013-09-28 Thread Geyslan G. Bem
Get rid of the useless '*clnt' variable. Signed-off-by: Geyslan G. Bem --- fs/9p/vfs_file.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c index aa5ecf4..42b7286 100644 --- a/fs/9p/vfs_file.c +++ b/fs/9p/vfs_file.c @@ -463,

[PATCH] 9p: proper use of the 'name' variable

2013-09-28 Thread Geyslan G. Bem
The 'name' variable was assigned but never used. Hence puts its assignment to the top and makes proper use of its value. Signed-off-by: Geyslan G. Bem --- fs/9p/vfs_inode_dotl.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/9p/vfs_inode_dotl

[PATCH] 9p: remove useless variable and assignment

2013-09-28 Thread Geyslan G. Bem
There is no use of pointer 'v9ses'. Get rid of useless 'retval' assignment. Signed-off-by: Geyslan G. Bem --- fs/9p/vfs_inode_dotl.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c index a892c2f..6803758 100644 --- a/fs

[PATCH] fs: exec.c: Coding style sanitization

2013-09-28 Thread Geyslan G. Bem
Adjustment based on the checkpatch.pl. Tested. Signed-off-by: Geyslan G. Bem --- fs/exec.c | 92 ++- 1 file changed, 49 insertions(+), 43 deletions(-) diff --git a/fs/exec.c b/fs/exec.c index 8875dd1..b5c6086 100644 --- a/fs/exec.c

[PATCH 1/1] fs/binfmt_elf.c: fill_note_info: Reduce scope of a variable

2013-09-28 Thread Geyslan G. Bem
The *t variable in the fill_note_info function is only used if siginfo->si_signo isn't 0. Moving "t" pointer to that inner scope. Tested. Signed-off-by: Geyslan G. Bem --- fs/binfmt_elf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/binfmt_elf.c

[PATCH v3 1/2] binfmt_aout: x86: Useless inode var, printks coding style fixes

2013-09-28 Thread Geyslan G. Bem
nd an a.out linked with a cross-compiled ld. Signed-off-by: Geyslan G. Bem --- fs/binfmt_aout.c | 98 +++- 1 file changed, 48 insertions(+), 50 deletions(-) diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c index 89dec7f..c732b8e 100644 ---

[PATCH v3 2/2] ia32_aout: x86_64: Add safe check in a.out loaders, printks, conding style fixes

2013-09-28 Thread Geyslan G. Bem
nd an a.out linked with a cross-compiled ld. Signed-off-by: Geyslan G. Bem --- arch/x86/ia32/ia32_aout.c | 63 +++ 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/arch/x86/ia32/ia32_aout.c b/arch/x86/ia32/ia32_aout.c index bae3aba..87

[PATCH] 9p: fix return value in case of error in v9fs_fid_xattr_set

2013-09-28 Thread Geyslan G. Bem
In case of error in the p9_client_write, the function v9fs_fid_xattr_set should return its negative value, what was never being done. Signed-off-by: Geyslan G. Bem --- fs/9p/xattr.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/fs/9p/xattr.c b/fs/9p/xattr.c index

[PATCH] 9p: remove never used return variable

2013-09-28 Thread Geyslan G. Bem
Get rid of the useless 'err' variable, since the return is treated farther down without the use of it. Signed-off-by: Geyslan G. Bem --- fs/9p/vfs_inode_dotl.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c index a7c4814..a892

[PATCH] 9p: remove useless assignment

2013-09-28 Thread Geyslan G. Bem
There is no use of pointer 'fid' before the next assignment. Signed-off-by: Geyslan G. Bem --- fs/9p/vfs_inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index 94de6d1..7566477 100644 --- a/fs/9p/vfs_inode.c +

[PATCH] 9p: remove unused 'super_block' struct pointer

2013-09-28 Thread Geyslan G. Bem
Get rid of the useless '*sb' variable. Signed-off-by: Geyslan G. Bem --- fs/9p/vfs_inode.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index 7566477..b352457 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c @@ -783,7 +783,6 @@ str

[PATCH] fs: exec.c: Coding style sanitization

2013-09-20 Thread Geyslan G. Bem
Adjustment based on the checkpatch.pl. Tested. Signed-off-by: Geyslan G. Bem --- fs/exec.c | 92 ++- 1 file changed, 49 insertions(+), 43 deletions(-) diff --git a/fs/exec.c b/fs/exec.c index 8875dd1..b5c6086 100644 --- a/fs/exec.c

[PATCH v2] tracing: fix referencing after memory freeing and refactors code

2013-11-06 Thread Geyslan G. Bem
In 'system_tr_open()': Fix possible 'dir' assignment after freeing it. In both functions: Restructures logic conditions testing 'tracing_is_disabled()' return before the others tests. Signed-off-by: Geyslan G. Bem --- kernel/trace/trace_events.c | 9 -

[PATCH] drivers: staging: dgnc: Remove useless casting in dgnc_driver.c

2013-10-16 Thread Geyslan G. Bem
Casting (void *) value returned by kzalloc is useless as mentioned in Documentation/CodingStyle, Chap 14. Signed-off-by: Geyslan G. Bem --- drivers/staging/dgnc/dgnc_driver.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers

[PATCH] drivers: staging: dgap: Remove useless casting in dgap_parse.c

2013-10-16 Thread Geyslan G. Bem
Casting (void *) value returned by kmalloc is useless as mentioned in Documentation/CodingStyle, Chap 14. Signed-off-by: Geyslan G. Bem --- drivers/staging/dgap/dgap_parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/dgap/dgap_parse.c b/drivers/staging

[PATCH] drivers: input: mouse: Remove useless casting in cypress_ps2.c

2013-10-16 Thread Geyslan G. Bem
Casting (void *) value returned by kzalloc is useless as mentioned in Documentation/CodingStyle, Chap 14. Signed-off-by: Geyslan G. Bem --- drivers/input/mouse/cypress_ps2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/mouse/cypress_ps2.c b/drivers/input

[PATCH] drivers: scsi: Remove useless casting in hpsa.c

2013-10-16 Thread Geyslan G. Bem
Casting (void *) value returned by kmalloc is useless as mentioned in Documentation/CodingStyle, Chap 14. Signed-off-by: Geyslan G. Bem --- drivers/scsi/hpsa.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 891c86b..896a57d

[PATCH] drivers: block: Remove useless casting in cciss_scsi.c

2013-10-16 Thread Geyslan G. Bem
Casting (void *) value returned by kmalloc is useless as mentioned in Documentation/CodingStyle, Chap 14. Signed-off-by: Geyslan G. Bem --- drivers/block/cciss_scsi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/block/cciss_scsi.c b/drivers/block/cciss_scsi.c

[PATCH] drivers: scsi: lpfc: Remove useless casting in lpfc_init.c

2013-10-16 Thread Geyslan G. Bem
Casting (void *) value returned by kzalloc is useless as mentioned in Documentation/CodingStyle, Chap 14. Signed-off-by: Geyslan G. Bem --- drivers/scsi/lpfc/lpfc_init.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc

[PATCH] sound: pci: emu10k1: Remove useless casting in emufx.c

2013-10-16 Thread Geyslan G. Bem
Casting (void *) value returned by kcalloc is useless as mentioned in Documentation/CodingStyle, Chap 14. Signed-off-by: Geyslan G. Bem --- sound/pci/emu10k1/emufx.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1

[PATCH] sound: pci: emu10k1: code refactoring and casting removal

2013-10-16 Thread Geyslan G. Bem
Partially restructures _snd_emu10k1_audigy_init_efx() and _snd_emu10k1_init_efx() functions. Removes useless casting (void *) from value returned by kcalloc; see Documentation/CodingStyle, Chap 14. Signed-off-by: Geyslan G. Bem --- sound/pci/emu10k1/emufx.c | 84

[PATCH v2] drivers: input: mouse: Remove useless casting in cypress_ps2.c

2013-10-16 Thread Geyslan G. Bem
Get rid of unnecessary (void *) casting in 'cypress_init' function. Signed-off-by: Geyslan G. Bem --- drivers/input/mouse/cypress_ps2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/mouse/cypress_ps2.c b/drivers/input/mouse/cypress_ps2.c ind

[PATCH v3] sound: pci: emu10k1: code refactoring and casting removal

2013-10-17 Thread Geyslan G. Bem
Partially restructures _snd_emu10k1_audigy_init_efx() and _snd_emu10k1_init_efx() functions. Removes useless casting (void *) from value returned by kcalloc; see Documentation/CodingStyle, Chap 14. Signed-off-by: Geyslan G. Bem --- sound/pci/emu10k1/emufx.c | 76

[PATCH v3] sound: pci: emu10k1: code refactoring

2013-10-17 Thread Geyslan G. Bem
Partially restructures _snd_emu10k1_audigy_init_efx() and _snd_emu10k1_init_efx() functions. Be noted that the cast is demanded to use '__user'. So, in these cases, avoid patches based on the coccinelle 'drop_kmalloc_cast' semantic patch. Signed-off-by: Geyslan G. Bem --

[PATCH] tracing: fix referencing after memory freeing and refactors code

2013-10-17 Thread Geyslan G. Bem
e_array_put' on error, in accordance to Coding Style, Chapter 7. Signed-off-by: Geyslan G. Bem --- kernel/trace/trace_events.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index 368a4d

[PATCH 1/2] tracing: creates 'tracing_is_disabled()'

2013-10-18 Thread Geyslan G. Bem
This patch creates the function 'tracing_is_disabled ", which can be used outside trace.c. Signed-off-by: Geyslan G. Bem --- kernel/trace/trace.c | 5 + kernel/trace/trace.h | 1 + 2 files changed, 6 insertions(+) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c ind

[PATCH 2/2] tracing: fix referencing after memory freeing and refactors code

2013-10-18 Thread Geyslan G. Bem
In 'system_tr_open()': Fix possible 'dir' assignment after freeing it. In both functions: Restructures logic conditions testing 'tracing_is_disabled()' return before the others tests. Centralizes the exiting in accordance to Coding Style, Chapter 7. Signed-off-b

[PATCH 1/2 v2] tracing: creates 'tracing_is_disabled()'

2013-10-18 Thread Geyslan G. Bem
This patch creates the function 'tracing_is_disabled', which can be used outside trace.c. Signed-off-by: Geyslan G. Bem --- kernel/trace/trace.c | 5 + kernel/trace/trace.h | 1 + 2 files changed, 6 insertions(+) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c ind

[PATCH v3] tracing: creates 'tracing_is_disabled()'

2013-10-18 Thread Geyslan G. Bem
This patch creates the function 'tracing_is_disabled', which can be used outside trace.c. Signed-off-by: Geyslan G. Bem --- kernel/trace/trace.c | 5 + kernel/trace/trace.h | 1 + 2 files changed, 6 insertions(+) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c ind

[PATCH] crypto: n2_core: insert '!err' condition in else scope

2013-10-19 Thread Geyslan G. Bem
This patch moves the '!err' condition into the above else scope, what is more obvious and has the secondary goal of avoid false-positives in statical analyze tools. Signed-off-by: Geyslan G. Bem --- drivers/crypto/n2_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) di

[PATCH] digsig: replace ERR_PTR(PTR_ERR(...)) with ERR_CAST

2013-10-19 Thread Geyslan G. Bem
Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)). 'err_cast.cocci' catch. Signed-off-by: Geyslan G. Bem --- lib/digsig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/digsig.c b/lib/digsig.c index 2f31e6a..8793aed 100644 --- a/lib/digsig.c

[PATCH] cpufreq: intel_pstate: fix possible integer overflow

2013-10-19 Thread Geyslan G. Bem
The expression 'pstate << 8' is evaluated using 32-bit arithmetic while 'val' expects an expression of type u64. Signed-off-by: Geyslan G. Bem --- drivers/cpufreq/intel_pstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/intel_

[PATCH] usb: cx231xx: Fix explicit freed pointer dereference

2013-11-20 Thread Geyslan G. Bem
Put kfree after the 'clear_bit()' call. Signed-off-by: Geyslan G. Bem --- drivers/media/usb/cx231xx/cx231xx-cards.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/cx231xx/cx231xx-cards.c b/drivers/media/usb/cx231xx/cx231xx-cards.c index e9d017

[PATCH v2] fs: binfmt_elf: Add ELF header consistency checks

2013-11-20 Thread Geyslan G. Bem
_DATA]' against 'ELF_DATA'. Besides the checks being in accordance with the ELF Specifications, they increase the binary consistency reducing the use of malformed ones. Signed-off-by: Geyslan G. Bem --- fs/binfmt_elf.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a

[PATCH] selinux: fix possible memory leak

2013-11-24 Thread Geyslan G. Bem
Free 'ctx_str' when necessary. Signed-off-by: Geyslan G. Bem --- security/selinux/xfrm.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/security/selinux/xfrm.c b/security/selinux/xfrm.c index a91d205..cf79a45 100644 --- a/security/selinux/xfrm.c +++

[PATCH v6] btrfs: Fix memory leakage in the tree-log.c

2013-10-11 Thread Geyslan G. Bem
In add_inode_ref() function: Initializes local pointers. Reduces the logical condition with the __add_inode_ref() return value by using only one 'goto out'. Centralizes the exiting, ensuring the freeing of all used memory. Signed-off-by: Geyslan G. Bem --- fs/btrfs/tree-

[PATCH] ecryptfs: Fix memory leakage in keystore.c

2013-10-11 Thread Geyslan G. Bem
In 'decrypt_pki_encrypted_session_key' function: Initializes 'payload' pointer and releases it on exit. Signed-off-by: Geyslan G. Bem --- fs/ecryptfs/keystore.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keys

[PATCH] nfs: Remove useless 'error' assignment

2013-10-11 Thread Geyslan G. Bem
the 'error' variable was been assigned twice in vain. Signed-off-by: Geyslan G. Bem --- fs/nfs/unlink.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/nfs/unlink.c b/fs/nfs/unlink.c index bb939ed..0c29b1b 100644 --- a/fs/nfs/unlink.c +++ b/fs/nfs/unlink.c

[PATCH] btrfs: simplify kmalloc+copy_from_user to memdup_user

2013-10-14 Thread Geyslan G. Bem
.fr/ Signed-off-by: Geyslan G. Bem --- fs/btrfs/ioctl.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 9d46f60..f0e3517 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -2727,15 +2727,10 @@ static long

[PATCH] fs/fhandle.c: 'handle_to_path' function reorganization

2013-10-14 Thread Geyslan G. Bem
e cleaner and more understandable. Uses 'memdup_user' instead 'kmalloc' + 'copy_from_user'. Signed-off-by: Geyslan G. Bem --- fs/fhandle.c | 48 ++-- 1 file changed, 18 insertions(+), 30 deletions(-) diff --git a/fs/fhandle.c b/

[PATCH] efivarfs: 'efivarfs_file_write' function reorganization

2013-10-14 Thread Geyslan G. Bem
This reorganization: Adds 'attrsize' variable to make the code cleaner and more understandable, replacing all 'sizeof(attributes)'. Removes 'bytes' prior assignment due this new approach. Uses 'memdup_user' instead 'kmalloc' + 'copy_from_

[PATCH] nfs: Use PTR_ERR_OR_ZERO in 'nfs/nfs4super.c'

2013-10-14 Thread Geyslan G. Bem
Use 'PTR_ERR_OR_ZERO()' rather than 'IS_ERR(...) ? PTR_ERR(...) : 0'. Signed-off-by: Geyslan G. Bem --- fs/nfs/nfs4super.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/nfs/nfs4super.c b/fs/nfs/nfs4super.c index e26acdd..ef71077 100644 ---

[PATCH] nfs: Use PTR_ERR_OR_ZERO in 'nfs41_callback_up' function

2013-10-14 Thread Geyslan G. Bem
Use 'PTR_ERR_OR_ZERO()' rather than 'IS_ERR(...) ? PTR_ERR(...) : 0'. Signed-off-by: Geyslan G. Bem --- fs/nfs/callback.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index 67cd732..1c9e867 100644 --- a/fs/nfs

[PATCH v2] nfs: Use PTR_ERR_OR_ZERO in 'nfs41_callback_up' function

2013-10-14 Thread Geyslan G. Bem
Use 'PTR_ERR_OR_ZERO()' rather than 'IS_ERR(...) ? PTR_ERR(...) : 0'. Signed-off-by: Geyslan G. Bem --- fs/nfs/callback.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index 67cd732..073b4cf 100644 --- a/fs/nfs

[PATCH v2] nfs: Use PTR_ERR_OR_ZERO in 'nfs/nfs4super.c'

2013-10-14 Thread Geyslan G. Bem
Use 'PTR_ERR_OR_ZERO()' rather than 'IS_ERR(...) ? PTR_ERR(...) : 0'. Signed-off-by: Geyslan G. Bem --- fs/nfs/nfs4super.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/nfs/nfs4super.c b/fs/nfs/nfs4super.c index e26acdd..65ab0a0

[PATCH] 9p: code refactor in vfs_inode.c

2013-10-29 Thread Geyslan G. Bem
9mode2unixmode(). In v9fs_refresh_inode(): Change 'umode' type from int to umode_t. Remove now useless 'rdev'. Signed-off-by: Geyslan G. Bem --- fs/9p/vfs_inode.c | 41 +++-- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/fs/9p

[PATCH v2] efivarfs: 'efivarfs_file_write' function reorganization

2013-10-30 Thread Geyslan G. Bem
This reorganization: Removes useless 'bytes' prior assignment. Uses 'memdup_user' instead 'kmalloc' + 'copy_from_user'. Signed-off-by: Geyslan G. Bem --- fs/efivarfs/file.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff

[PATCH] xfs: fix possible NULL dereference

2013-10-21 Thread Geyslan G. Bem
This patch puts a 'break' in the true branch, avoiding the 'icptr->ic_next' dereferencing. Signed-off-by: Geyslan G. Bem --- fs/xfs/xfs_log.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index a2dea108..8cde

[PATCH] 9p: remove useless 'name' variable and assignment

2013-10-21 Thread Geyslan G. Bem
There is no use of 'name' pointer. Get rid of its useless assignment. Signed-off-by: Geyslan G. Bem --- fs/9p/vfs_inode_dotl.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c index a7c4814..2cd9042 100644 --- a/fs/9p/vfs_inode_do

[PATCH] 9p: fix return value in case in v9fs_fid_xattr_set()

2013-10-21 Thread Geyslan G. Bem
In case of error in the p9_client_write, the function v9fs_fid_xattr_set should return its negative value, what was never being done. In case of success it only retuned 0. Now it returns the 'offset' variable (write_count total). Signed-off-by: Geyslan G. Bem --- fs/9p/xa

[PATCH] ecryptfs: Fix explicit null dereference

2013-11-14 Thread Geyslan G. Bem
If the condition 'ecryptfs_file_to_private(file)' takes false branch lower_file is dereferenced when NULL. Caught by Coverity: CIDs 1128834 and 1128833. Signed-off-by: Geyslan G. Bem --- fs/ecryptfs/file.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff

[PATCH] net/hsr: Fix possible leak in 'hsr_get_node_status()'

2013-11-14 Thread Geyslan G. Bem
If 'hsr_get_node_data()' returns error, going directly to 'fail' label doesn't free the memory pointed by 'skb_out'. Signed-off-by: Geyslan G. Bem --- net/hsr/hsr_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/hsr/hsr_netl

[PATCH] brcmfmac: fix possible memory leak

2013-11-15 Thread Geyslan G. Bem
In case of error free 'chanspecs'. Signed-off-by: Geyslan G. Bem --- drivers/net/wireless/brcm80211/brcmfmac/p2p.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/brcm80211/brcmfmac/p

[PATCH v2] brcmfmac: fix possible memory leak

2013-11-15 Thread Geyslan G. Bem
Free temporary 'chanspecs' avoiding leakage. Signed-off-by: Geyslan G. Bem --- drivers/net/wireless/brcm80211/brcmfmac/p2p.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c index d7a974

[PATCH] mmc: sdhci-spear: fix possible null dereference

2013-11-17 Thread Geyslan G. Bem
Put the 'pdata->card_int_gpio' assignment in inner scope, avoiding explicit null dereference. Signed-off-by: Geyslan G. Bem --- drivers/mmc/host/sdhci-spear.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/

[PATCH] scsi: be_iscsi: fix possible memory leak and refactor code

2013-11-17 Thread Geyslan G. Bem
This patch fix memory leakage in cases 'ISCSI_NET_PARAM_VLAN_ID' and 'ISCSI_NET_PARAM_VLAN_PRIORITY' and refactors code 'going out' when necessary. Signed-off-by: Geyslan G. Bem --- drivers/scsi/be2iscsi/be_iscsi.c | 41 +---

[PATCH v2] scsi: be_iscsi: fix possible memory leak

2013-11-18 Thread Geyslan G. Bem
This patch fix memory leakage in cases 'ISCSI_NET_PARAM_VLAN_ID' and 'ISCSI_NET_PARAM_VLAN_PRIORITY'. Note: 'if_info' will be allocated only when 'mgmt_get_if_info()' returns NULL. Signed-off-by: Geyslan G. Bem --- drivers/scsi/be2iscsi/be_iscsi.c |

Re: [PATCH] Staging: cdrom: fix space required after that ','

2015-12-04 Thread Geyslan G. Bem
_challenge)) > +#define copy_key(dest, src)memcpy((dest), (src), sizeof(dvd_key)) > +#define copy_chal(dest, :src) memcpy((dest), (src), sizeof(dvd_challenge)) > > static void setup_report_key(struct packet_command *cgc, unsigned agid, > unsigned type) > { > -- > 1.9

Re: [PATCH 2/3] usb: whci: replace dma_pool_alloc and memset with dma_pool_zalloc

2015-12-04 Thread Geyslan G. Bem
2015-12-04 13:25 GMT-03:00 Greg Kroah-Hartman : > On Wed, Dec 02, 2015 at 05:43:11PM -0300, Geyslan G. Bem wrote: >> Replace dma_pool_alloc and memset with a single call to dma_pool_zalloc. >> >> Caught by coccinelle. >> >> Signed-off-by: Geyslan G. Bem >> -

Re: [PATCH 2/3] usb: whci: replace dma_pool_alloc and memset with dma_pool_zalloc

2015-12-04 Thread Geyslan G. Bem
2015-12-04 13:44 GMT-03:00 Greg Kroah-Hartman : > On Fri, Dec 04, 2015 at 01:33:18PM -0300, Geyslan G. Bem wrote: >> >> If you wish, you could list me subsystems in need of maintenance. > > I don't understand what you mean by this. I meant that would be great to know w

Re: [PATCH 2/3] usb: whci: replace dma_pool_alloc and memset with dma_pool_zalloc

2015-12-04 Thread Geyslan G. Bem
2015-12-04 14:18 GMT-03:00 Greg Kroah-Hartman : > On Fri, Dec 04, 2015 at 02:13:35PM -0300, Geyslan G. Bem wrote: >> 2015-12-04 13:44 GMT-03:00 Greg Kroah-Hartman : >> > On Fri, Dec 04, 2015 at 01:33:18PM -0300, Geyslan G. Bem wrote: >> >> >> >> If you wis

[RFC] usb: coccinelle and checkpatch cleanup

2015-12-04 Thread Geyslan G. Bem
While applying the "scripts/coccinelle/misc/compare_const_fl.cocci" in usb/host/ tree I found files that deserve almost a full cleanup (very wrong coding style). Eg. drivers/usb/host/ohci-dbg.c Can I do a full cleaning or only coccinelle patches? -- Regards, Geyslan G. Bem hacki

[RFC BUG] coccinelle: use_after_iter parse error

2015-12-06 Thread Geyslan G. Bem
Hi maintainers, I'm having these error output using coccinelle. -- Regards, Geyslan G. Bem hackingbits.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kerne

Re: [RFC BUG] coccinelle: use_after_iter parse error

2015-12-06 Thread Geyslan G. Bem
2015-12-06 10:09 GMT-03:00 Geyslan G. Bem : > Hi maintainers, > > I'm having these error output using coccinelle. Sorry, gmail and its ctrl+enter shortcut. :/ geyslan@hb ~/Projects/linux $ make coccicheck V=2 M=drivers/usb/host/ -j4 > cocciout Fatal error: exception Failure(&q

Re: [RFC BUG] coccinelle: use_after_iter parse error

2015-12-06 Thread Geyslan G. Bem
2015-12-06 10:17 GMT-03:00 Julia Lawall : > > > On Sun, 6 Dec 2015, Geyslan G. Bem wrote: > >> 2015-12-06 10:09 GMT-03:00 Geyslan G. Bem : >> > Hi maintainers, >> > >> > I'm having these error output using coccinelle. >> >> Sorry, gma

[PATCH] usb: host: iounmap before return

2015-12-06 Thread Geyslan G. Bem
This patch fixes a 'quirk_usb_handoff_xhci()' branch return that was not unmapping correctly. Coccinelle: scripts/coccinelle/free/iounmap.cocci Signed-off-by: Geyslan G. Bem --- drivers/usb/host/pci-quirks.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/d

Re: [RFC] usb: coccinelle and checkpatch cleanup

2015-12-06 Thread Geyslan G. Bem
2015-12-04 18:55 GMT-03:00 Geyslan G. Bem : > While applying the "scripts/coccinelle/misc/compare_const_fl.cocci" in > usb/host/ tree I found files that deserve almost a full cleanup (very > wrong coding style). Eg. drivers/usb/host/ohci-dbg.c By wrong coding style I meant chec

Re: [PATCH] usb: host: iounmap before return

2015-12-07 Thread Geyslan G. Bem
2015-12-07 6:30 GMT-03:00 Lu Baolu : > > > On 12/06/2015 09:47 PM, Geyslan G. Bem wrote: >> This patch fixes a 'quirk_usb_handoff_xhci()' branch return that was not >> unmapping correctly. >> >> Coccinelle: scripts/coccinelle/free/iounma

[BUG] checkpatch: unescaped left brace in regex is deprecated

2015-12-07 Thread Geyslan G. Bem
ned| cacheline_aligned_in_smp| cacheline_internodealigned_in_smp| __weak ... geyslan@hb ~/Projects/linux $ perl --version This is perl 5, version 22, subversion 0 (v5.22.0) built for x86_64-linux-thread-multi -- Regards, Geyslan G. Bem hackingbits.com --

[PATCH v2] usb: host: iounmap before return

2015-12-07 Thread Geyslan G. Bem
This patch fixes a 'quirk_usb_handoff_xhci()' branch return that was not unmapping correctly. Coccinelle: scripts/coccinelle/free/iounmap.cocci Signed-off-by: Geyslan G. Bem --- drivers/usb/host/pci-quirks.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/driver

Re: [BUG] checkpatch: unescaped left brace in regex is deprecated

2015-12-07 Thread Geyslan G. Bem
2015-12-07 20:06 GMT-03:00 Joe Perches : > On Mon, 2015-12-07 at 19:53 -0300, Geyslan G. Bem wrote: >> Hello, > > hello. > >> Follow checkpatch output using perl 5.22.0. >> >> geyslan@hb ~/Projects/linux $ scripts/checkpatch.pl -f >> drivers/usb/host/ehci

Re: [PATCH] usb: host: iounmap before return

2015-12-07 Thread Geyslan G. Bem
2015-12-07 8:37 GMT-03:00 Sergei Shtylyov : > Hello. > > On 12/07/2015 12:30 PM, Lu Baolu wrote: > >>> This patch fixes a 'quirk_usb_handoff_xhci()' branch return that was not >>> unmapping correctly. >>> >>> Coccinelle: scripts/coccinell

Re: [BUG] checkpatch: unescaped left brace in regex is deprecated

2015-12-15 Thread Geyslan G. Bem
2015-12-10 8:24 GMT-03:00 Geyslan G. Bem : > 2015-12-09 19:59 GMT-03:00 Geyslan G. Bem : >> >> >> 2015-12-07 20:36 GMT-03:00 Geyslan G. Bem : >>> >>> 2015-12-07 20:06 GMT-03:00 Joe Perches : >>> > On Mon, 2015-12-07 at 19:53 -0300, Ge

Re: [BUG] checkpatch: unescaped left brace in regex is deprecated

2015-12-16 Thread Geyslan G. Bem
2015-12-15 21:13 GMT-03:00 Joe Perches : > On Tue, 2015-12-15 at 20:58 -0300, Geyslan G. Bem wrote: >> 2015-12-10 8:24 GMT-03:00 Geyslan G. Bem : >> > Suggested-by: Peter Senna Tschudin >> > Reported-by: Geyslan G. Bem >> > >> >> Joe, do you appl

[PATCH] um: fix returns without va_end

2015-12-01 Thread Geyslan G. Bem
When using va_list ensure that va_start will be followed by va_end. Signed-off-by: Geyslan G. Bem --- arch/um/drivers/net_user.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/um/drivers/net_user.c b/arch/um/drivers/net_user.c index e697a41..e9f8445 100644

[PATCH] kvm: remove unused variable 'vcpu_book3s'

2015-12-01 Thread Geyslan G. Bem
The vcpu_book3s struct is assigned but never used. So remove it. Signed-off-by: Geyslan G. Bem --- arch/powerpc/kvm/book3s_64_mmu.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/powerpc/kvm/book3s_64_mmu.c b/arch/powerpc/kvm/book3s_64_mmu.c index 774a253..9bf7031 100644 --- a/arch

Re: [PATCH] kvm: remove unused variable 'vcpu_book3s'

2015-12-01 Thread Geyslan G. Bem
2015-12-01 21:34 GMT-03:00 Daniel Axtens : > "Geyslan G. Bem" writes: > >> The vcpu_book3s struct is assigned but never used. So remove it. > > Just out of interest, how did you find this? Compiler warning? Static > analysis? Manual inspection? Sorry, I should hav

[PATCH] ia64: bitvector_process could read out of bounds

2015-12-02 Thread Geyslan G. Bem
ady for it and avoid misleadings. Catched using static analysis (cppcheck). Signed-off-by: Geyslan G. Bem --- arch/ia64/kernel/palinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/ia64/kernel/palinfo.c b/arch/ia64/kernel/palinfo.c index c39c3cd..160aba1 100644 --

  1   2   3   >