There is otherwise a risk of a possible null pointer dereference.
Was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/video/fbdev/s3fb.c |3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/video
ckpatch.pl
Best regards
Rickard Strandqvist
2014-05-21 9:24 GMT+02:00 Dan Carpenter :
> On Tue, May 20, 2014 at 04:57:56PM -0700, j...@joshtriplett.org wrote:
>> On Tue, May 20, 2014 at 06:26:51PM -0500, Larry Finger wrote:
>> > On 05/20/2014 04:31 PM, Rickard Strandqvist wrote
Removal of null pointer checks that could never happen
Signed-off-by: Rickard Strandqvist
---
drivers/staging/rtl8188eu/os_dep/usb_intf.c | 110 +--
1 file changed, 52 insertions(+), 58 deletions(-)
diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c
b/drivers
Removal of null pointer checks that could never happen
Signed-off-by: Rickard Strandqvist
---
sound/soc/samsung/dma.c |3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/samsung/dma.c b/sound/soc/samsung/dma.c
index dc09b71..0f17ae0 100644
--- a/sound/soc/samsung
Removal of null pointer checks that could never happen
Signed-off-by: Rickard Strandqvist
---
drivers/staging/rtl8192u/r8192U_core.c |3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/rtl8192u/r8192U_core.c
b/drivers/staging/rtl8192u/r8192U_core.c
index 1bb6143..b709750
There is otherwise a risk of a possible null pointer dereference.
Was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
fs/btrfs/volumes.c |5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/volumes.c
There is otherwise a risk of a possible null pointer dereference.
Was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
fs/ntfs/file.c |7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/fs/ntfs/file.c b/fs
There is otherwise a risk of a possible null pointer dereference.
Was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
fs/ocfs2/move_extents.c |4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/ocfs2
Cleaning up inconsistent NULL checks.
There is otherwise a risk of a possible null pointer dereference.
Was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
tools/perf/builtin-trace.c |6 --
1 file changed, 4 insertions(+), 2
Cleaning up inconsistent NULL checks.
There is otherwise a risk of a possible null pointer dereference.
Was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
tools/perf/util/session.c |4 +++-
1 file changed, 3 insertions(+), 1
Cleaning up inconsistent NULL checks.
There is otherwise a risk of a possible null pointer dereference.
Was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
arch/cris/arch-v32/drivers/axisflashmap.c |2 +-
1 file changed, 1
Cleaning up inconsistent NULL checks.
There is otherwise a risk of a possible null pointer dereference.
Was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
arch/metag/mm/hugetlbpage.c |3 ++-
1 file changed, 2 insertions(+), 1
Cleaning up inconsistent NULL checks.
There is otherwise a risk of a possible null pointer dereference.
Was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
arch/powerpc/kernel/fadump.c |8 +---
1 file changed, 5 insertions
Hej Jesper!
But in several other place in the feature ensures that main_mtd is not NULL.
(That's what cppcheck base their misjudgment on too)
Then all these checks are unnecessary?
You should know, looks like you've written most of the code in 2007 :)
Best regards
Rickard Strandqvist
Okay, I wrote a patch with many errors in relation to how you want
your patches on 3 of May. Maybe from there.
But good, then this fix is included :)
Best regards
Rickard Strandqvist
2014-05-23 9:05 GMT+02:00 Jiri Olsa :
> On Thu, May 22, 2014 at 11:58:36PM +0200, Rickard Strandqvist wr
Hi
Ok good, then everything is under control.
The result has been that I've done a number of these types of patches to :)
Sending a new patch of that kind then.
Best regards
Rickard Strandqvist
2014-05-26 5:28 GMT+02:00 Jeff Liu :
> Hi,
>
> On 05/23/2014 04:46 AM, Rickard Str
Removal of null pointer checks that could never happen
Signed-off-by: Rickard Strandqvist
---
fs/ocfs2/move_extents.c |3 ---
1 file changed, 3 deletions(-)
diff --git a/fs/ocfs2/move_extents.c b/fs/ocfs2/move_extents.c
index 599eb4c..9ba3a10 100644
--- a/fs/ocfs2/move_extents.c
+++ b/fs
sb = OCFS2_SB(inode->i_sb);
+ struct ocfs2_super *osb;
if (!inode)
return -ENOENT;
+ osb = OCFS2_SB(inode->i_sb);
+
if (ocfs2_is_hard_readonly(osb) || ocfs2_is_soft_readonly(osb))
Best regards
Rickard Strandqvist
2014-05-29 23:38 GMT+02:00 Andre
it removed.
Best regards
Rickard Strandqvist
2014-05-28 12:03 GMT+02:00 James Hogan :
> Hi Rickard,
>
> On 22/05/14 23:01, Rickard Strandqvist wrote:
>> Cleaning up inconsistent NULL checks.
>> There is otherwise a risk of a possible null pointer dereference.
>>
>&g
Hi
Quite rightly, this is what cppcheck reacts.
Ok, I'll send a patch for that instead then.
Best regards
Rickard Strandqvist
2014-05-28 13:38 GMT+02:00 Tomas Henzl :
> On 05/28/2014 01:28 PM, Christoph Hellwig wrote:
>> On Sun, May 18, 2014 at 06:14:00PM +0200, Rickard Str
Removal of null pointer checks that could never happen
Signed-off-by: Rickard Strandqvist
---
drivers/scsi/pm8001/pm8001_hwi.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c
index a97be01..721d059 100644
Removal of null pointer checks that could never happen
Signed-off-by: Rickard Strandqvist
---
arch/metag/mm/hugetlbpage.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/metag/mm/hugetlbpage.c b/arch/metag/mm/hugetlbpage.c
index 0424315..e89c843 100644
--- a/arch
Cleaning up a file resource leak
Signed-off-by: Rickard Strandqvist
---
Documentation/connector/ucon.c |2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/connector/ucon.c b/Documentation/connector/ucon.c
index 8a4da64..f09c6de 100644
--- a/Documentation/connector/ucon.c
Removing the risk of using a non-allocated file resource
Signed-off-by: Rickard Strandqvist
---
tools/power/cpupower/bench/parse.c |7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tools/power/cpupower/bench/parse.c
b/tools/power/cpupower/bench/parse.c
index 543bba1
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
arch/tile/kernel/unaligned.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
arch/x86/kvm/x86.c |8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
arch/x86/math-emu/poly_tan.c |1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/math-emu
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/atm/fore200e.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/gpu/drm/radeon/r600_cp.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/iio/adc/ad_sigma_delta.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
There is a risk for memory leak in when something unexpected happens
and the function returns.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/staging/rtl8712/rtl871x_ioctl_linux.c |1 +
1 file changed, 1
There is a risk for memory leak in when something unexpected happens
and the function returns.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/staging/rtl8712/rtl871x_mlme.c | 16 +++-
1 file changed
There is a risk for memory leak in when something unexpected happens
and the function returns.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/thermal/ti-soc-thermal/ti-bandgap.c |3 ++-
1 file changed, 2
There is a risk for memory leak in when something unexpected happens
and the function returns.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
sound/synth/emux/soundfont.c |1 +
1 file changed, 1 insertion(+)
diff
There is a risk for memory leak in when something unexpected happens
and the function returns.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
tools/lib/traceevent/parse-filter.c |4 +++-
1 file changed, 3 insertions
There is a risk for memory leak in when something unexpected happens
and the function returns.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
tools/perf/builtin-trace.c |1 +
1 file changed, 1 insertion(+)
diff --git
han->scan_type.realbits + chan->scan_type.shift, 8),
&raw_sample);
out:
sample = raw_sample >> chan->scan_type.shift;
Best regards
Rickard Strandqvist
2014-06-01 11:15 GMT+02:00 Lars-Peter Clausen :
> On 06/01/2014 01:11 AM, Rickard Strandqvist wrote:
>>
>&
Aaa, that is true! Sorry my mistake :(
Best regards
Rickard Strandqvist
2014-06-01 14:03 GMT+02:00 Lars-Peter Clausen :
> On 06/01/2014 01:51 PM, Rickard Strandqvist wrote:
>>
>> Hi
>>
>> Believe it reacted to the code below.
>>
>> If raw_sample = 0
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/media/usb/dvb-usb-v2/mxl111sf.c |2 +-
1 file changed, 1 insertion(+), 1 deletion
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c |2 +-
1 file changed, 1 insertion(+), 1 deletion
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/net/wireless/libertas/cmd.c |1 +
1 file changed, 1 insertion(+)
diff --git a/drivers
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/net/wireless/rt2x00/rt2x00mac.c |2 ++
1 file changed, 2 insertions(+)
diff --git a
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/net/wireless/rtlwifi/rtl8192de/phy.c |2 +-
1 file changed, 1 insertion(+), 1 deletion
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/pinctrl/pinctrl-abx500.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/platform/x86/asus-wmi.c |4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/scsi/advansys.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/scsi/mpt3sas/mpt3sas_transport.c |6 ++
1 file changed, 2 insertions(+), 4 deletions
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/scsi/pm8001/pm80xx_hwi.c |6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/scsi/sun3_NCR5380.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/staging/rtl8188eu/os_dep/usb_intf.c |2 +-
1 file changed, 1 insertion(+), 1 deletion
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/staging/rtl8192u/r8192U_core.c |5 +++--
1 file changed, 3 insertions(+), 2 deletions
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/staging/tidspbridge/pmgr/dspapi.c |8
1 file changed, 4 insertions(+), 4
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/tty/serial/msm_serial.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/usb/class/usbtmc.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/usb/musb/musb_host.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
fs/ocfs2/dir.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ocfs2/dir.c
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
net/bluetooth/hci_core.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
sound/pci/ice1712/wm8766.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
sound/pci/ice1712/wm8776.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a
m not sure if it can happen in reality...
Guessing it will be caught by in that case by:
if (!chan)
return NULL;
I had actually not planned to submit this divided by 0 patch at all :-/
Best regards
Rickard Strandqvist
2014-06-01 16:24 GMT+02:00 Marcel Holtmann :
> Hi Rickard,
&g
Removes unnecessary code that does not do anything useful.
This was partly found using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/staging/rtl8188eu/os_dep/usb_intf.c |8 +---
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git
Hi Sergei!
Okay, sorry. But you agree with what it is doing in general then?
In this case, I am sending a new patch...
Best regards
Rickard Strandqvist
2014-06-01 18:38 GMT+02:00 Sergei Shtylyov :
> Hello.
>
>
> On 06/01/2014 04:49 PM, Rickard Strandqvist wrote:
>
>> The
Hi Dimitrios!
Okay sorry, I see what you mean...
Best regards
Rickard Strandqvist
2014-06-01 21:11 GMT+02:00 Dimitrios Michailidis :
> Rickard Strandqvist wrote:
>> There is a risk that the variable will be used without being initialized.
>
> There isn't actual risk here,
In this case the wrong variable is used, which has never been initialized.
This will lead to a serious error.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/power/ab8500_fg.c |4 ++--
1 file changed, 2
There is a risk that the variables will be used without being initialized.
Have also moved variable to the part of the code where it is used.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/net/wireless/rtlwifi
iable then instead?
Best regards
Rickard Strandqvist
2014-06-01 22:37 GMT+02:00 Dan Carpenter :
> On Sun, Jun 01, 2014 at 03:28:35PM +0200, Rickard Strandqvist wrote:
>> There is a risk that the variable will be used without being initialized.
>>
>> This was largely found by us
>From what I know, AND is faster then modulo.
Not sure if this is worth changing though.
Signed-off-by: Rickard Strandqvist
---
arch/ia64/kernel/palinfo.c |3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/ia64/kernel/palinfo.c b/arch/ia64/kernel/palinfo.c
in
>From what I know, AND is faster then modulo.
Not sure if this is worth changing though.
Signed-off-by: Rickard Strandqvist
---
arch/ia64/kernel/patch.c |3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/ia64/kernel/patch.c b/arch/ia64/kernel/patch.c
index 1cf0
>From what I know, AND is faster then modulo.
Not sure if this is worth changing though.
Signed-off-by: Rickard Strandqvist
---
arch/ia64/kernel/smpboot.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
index 547a
>From what I know, AND is faster then modulo.
Not sure if this is worth changing though.
Signed-off-by: Rickard Strandqvist
---
arch/sparc/kernel/smp_64.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c
index 745a
Hi Christian!
Yes! I mail about this for the first time in early May, but ther were
many other faults in the design of my patch, had several different
types of errors in the same path etc.
So good that they have already been solved then :)
Best regards
Rickard Strandqvist
2014-06-01 23:50
Hi
Thanks for your response!
No, it does not sound like it's worth changing anything.
Although in the worst case with this patch you probably have a more
consistent error :)
Best regards
Rickard Strandqvist
2014-06-02 9:48 GMT+02:00 Christian König :
> Am 01.06.2014 01:10, schrieb
Hi
Thought I would be able to do that. But after testing, I could not
measure any difference.
Thought it would make a noticeable difference, but guess gcc resolve
this in the best way.
Best regards
Rickard Strandqvist
2014-06-02 9:24 GMT+02:00 Clemens Ladisch :
> Rickard Strandqvist wr
Hi
No, regardless if it is a program that cppcheck or myself with limited
experience of kernel programming is not so easy to figure out.
But then I know that there is nothing wrong in this case, and that is
the main thing :-)
Best regards
Rickard Strandqvist
2014-06-02 2:10 GMT+02:00 Olof
=all drivers/staging/rtl8192u/r8192U_core.c
Best regards
Rickard Strandqvist
2014-06-02 9:39 GMT+02:00 Dan Carpenter :
> On Sun, Jun 01, 2014 at 11:05:39PM +0200, Rickard Strandqvist wrote:
>> Hi Dan
>>
>> I agree, this looks strange.
>> Have been looking for a while in hi
check before I send any more patches.
Best regards
Rickard Strandqvist
2014-06-02 11:12 GMT+02:00 Dan Carpenter :
> On Sun, Jun 01, 2014 at 03:23:40PM +0200, Rickard Strandqvist wrote:
>> There is a risk that the variable will be used without being initialized.
>>
>> This wa
Hi
Okay, then I make a new patch with only the if() part of the code.
Best regards
Rickard Strandqvist
2014-06-02 19:08 GMT+02:00 Eduardo Valentin :
> On Sun, Jun 01, 2014 at 01:33:51PM +0200, Rickard Strandqvist wrote:
>> There is a risk for memory leak in when something unexpecte
Wrong address is checked after memory allocation.
Signed-off-by: Rickard Strandqvist
---
drivers/thermal/ti-soc-thermal/ti-bandgap.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/ti-soc-thermal/ti-bandgap.c
b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
the out: part of the code.
Sorry about this :-(
Best regards
Rickard Strandqvist
2014-06-02 22:22 GMT+02:00 Andrew Morton :
> On Sun, 1 Jun 2014 15:53:04 +0200 Rickard Strandqvist
> wrote:
>
>> There is a risk that the variable will be used without being initialized.
>
&g
Hi
Okay, this code has been changed in linux-next, before the allocation
before the switch statement.
Yes, I repeat it to myself.. I'll check everything against linux-next
in the future!
Best regards
Rickard Strandqvist
2014-06-02 10:41 GMT+02:00 Dan Carpenter :
> On Sun, Jun 01, 20
Fix for possible null pointer dereferenc, and there is a risk
for memory leak in when something unexpected happens and the
function returns.
Signed-off-by: Rickard Strandqvist
---
drivers/i2c/busses/i2c-pxa.c | 19 +++
1 file changed, 11 insertions(+), 8 deletions(-)
diff
Best regards
Rickard Strandqvist
2014-06-02 12:10 GMT+02:00 Dan Carpenter :
> [ I am writing this at the end after writing the rest of this email.
>
> After looking at the CP_TO_USR() macro more carefully, I realize that
> the uninitialized variable bugs you are fixing are false posit
There is a risk that the variables will be used without being initialized.
Has also improved error handling, after an email proposal from Dan Carpenter.
Signed-off-by: Rickard Strandqvist
---
drivers/staging/tidspbridge/pmgr/dspapi.c | 64 ++---
1 file changed, 31
Minimized the use of snprintf()
And removed a variable that was only used for the temporary storage.
This was partly found using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/scsi/bfa/bfad_attr.c | 14 --
1 file changed, 8
Added a guaranteed null-terminate after call to strncpy.
This was partly found using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
Documentation/accounting/getdelays.c |1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/accounting
Added a guaranteed null-terminate after call to strncpy.
This was partly found using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
Documentation/laptops/hpfall.c |1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/laptops/hpfall.c b
Added a guaranteed null-terminate after call to strncpy.
This was partly found using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a
Added a guaranteed null-terminate after call to strncpy.
This was partly found using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/s390/scsi/zfcp_aux.c |1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers
Added a guaranteed null-terminate after call to strncpy.
This was partly found using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/scsi/bfa/bfad_attr.c |3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/bfa
Added a guaranteed null-terminate after call to strncpy.
This was partly found using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/scsi/ibmvscsi/ibmvscsi.c |4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi
Added a guaranteed null-terminate after call to strncpy.
This was partly found using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/scsi/mpt2sas/mpt2sas_base.c |3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi
Added a guaranteed null-terminate after call to strncpy.
This was partly found using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/scsi/mpt3sas/mpt3sas_base.c |3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi
Added a guaranteed null-terminate after call to strncpy.
This was partly found using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
drivers/staging/usbip/stub_main.c |1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/usbip/stub_main.c
Added a guaranteed null-terminate after call to strncpy.
This was partly found using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
kernel/debug/kdb/kdb_io.c |6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/kernel/debug/kdb
Added a guaranteed null-terminate after call to strncpy.
This was partly found using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
kernel/debug/kdb/kdb_main.c |6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/kernel/debug/kdb
Added a guaranteed null-terminate after call to strncpy.
This was partly found using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
tools/lib/api/fs/debugfs.c |1 +
1 file changed, 1 insertion(+)
diff --git a/tools/lib/api/fs/debugfs.c b/tools/lib
Added a guaranteed null-terminate after call to strncpy.
This was partly found using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
tools/perf/util/parse-events.c |4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util
Added a guaranteed null-terminate after call to strncpy.
This was partly found using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist
---
tools/perf/util/svghelper.c |7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tools/perf/util
Hi
A little embarrassing, but I actually did not know that there was a
better replacement for strncpy.
Sorry, but I will send a new platch based on strlcpy instead then.
Best regards
Rickard Strandqvist
2014-06-04 23:59 GMT+02:00 Heiko Carstens :
> On Wed, Jun 04, 2014 at 11:31:11PM +0
Hi
A little embarrassing, but I actually did not know that there was a
better replacement for strncpy.
Sorry, but I will send a new platch based on strlcpy instead then,
snprintf i slow and unnecessary in this case.
Best regards
Rickard Strandqvist
2014-06-05 0:20 GMT+02:00 Andi Kleen :
>
601 - 700 of 1004 matches
Mail list logo