there is an additional "{", which causes building error.
Signed-off-by: Cong Ding
---
arch/avr32/boards/atngw100/mrmt.c |1 -
1 file changed, 1 deletion(-)
diff --git a/arch/avr32/boards/atngw100/mrmt.c
b/arch/avr32/boards/atngw100/mrmt.c
index ccc9599..1ba09e4 100644
--- a/
On Mon, May 27, 2013 at 12:14 AM, Cong Ding wrote:
> On Thu, Apr 25, 2013 at 12:19 PM, Cong Ding wrote:
>> On Thu, Feb 14, 2013 at 12:43:15PM +0100, Cong Ding wrote:
>>> On Sun, Jan 20, 2013 at 10:01:41PM +0100, Hans J. Koch wrote:
>>> > On Fri, Jan 18, 2013 a
The use of variable packet_beacon might be uninitialized in the two files,
which is same as this patch:
https://patchwork.kernel.org/patch/2006711/
Signed-off-by: Cong Ding
---
drivers/net/wireless/rtlwifi/rtl8192ce/trx.c |2 +-
drivers/net/wireless/rtlwifi/rtl8192cu/mac.c |2 +-
2
The variable npages might be used uninitialized in line 594.
Signed-off-by: Cong Ding
---
drivers/infiniband/hw/cxgb3/iwch_provider.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c
b/drivers/infiniband/hw/cxgb3/iwch_provider.c
On Tue, Feb 05, 2013 at 08:47:10AM +0900, Kyungmin Park wrote:
> Hi,
>
> On Tue, Feb 5, 2013 at 7:11 AM, Cong Ding wrote:
> > If it goes to eclk through line 1107, the variable res would be NULL. It
> > will
> > cause a null pointer dereference error if
If it goes to eclk through line 1107, the variable res would be NULL. It will
cause a null pointer dereference error if we call release_mem_region.
Signed-off-by: Cong Ding
---
drivers/i2c/busses/i2c-pxa.c |3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/i2c
On Tue, Feb 05, 2013 at 09:14:08AM +0800, Haojian Zhuang wrote:
> On Tue, Feb 5, 2013 at 8:05 AM, Cong Ding wrote:
> > If it goes to eclk through line 1107, the variable res would be NULL. It
> > will
> > cause a null pointer dereference error if we call release_mem_regio
Using 'sizeof' on array given as function argument returns size of a pointer
rather than the size of array.
Signed-off-by: Cong Ding
---
net/mac80211/cfg.c |3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 661b878..af561d5
we have to call kobject_put() to clean up the kobject after function
kobject_init(), kobject_add(), or kobject_uevent() is called.
Signed-off-by: Cong Ding
---
drivers/uio/uio.c | 16 ++--
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/uio/uio.c b/drivers
To print "int" value, we should use %d rather than %u.
Signed-off-by: Cong Ding
---
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 af7d531..dcc099a 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/v
The memory allocated to "name" by function "extref_get_fields" isn't properly
freed when error occurs.
Signed-off-by: Cong Ding
---
fs/btrfs/tree-log.c |4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
in
On Thu, Apr 25, 2013 at 12:19 PM, Cong Ding wrote:
> On Thu, Feb 14, 2013 at 12:43:15PM +0100, Cong Ding wrote:
>> On Sun, Jan 20, 2013 at 10:01:41PM +0100, Hans J. Koch wrote:
>> > On Fri, Jan 18, 2013 at 02:00:50PM -0800, Greg Kroah-Hartman wrote:
>> > > On Fri, Ja
On Thu, Feb 14, 2013 at 12:43:15PM +0100, Cong Ding wrote:
> On Sun, Jan 20, 2013 at 10:01:41PM +0100, Hans J. Koch wrote:
> > On Fri, Jan 18, 2013 at 02:00:50PM -0800, Greg Kroah-Hartman wrote:
> > > On Fri, Jan 18, 2013 at 10:05:45PM +0100, Cong Ding wrote:
> > > >
No, there are some exceptions. Imagine this case, when mi=0,
everything works correct in the loop, and then mi=1, if the kzalloc in
line 286 fails, you patch will goto err_map with ret=-ENOMEM, while
Hans's patch will goto err_map with ret=0 (the ret=0 is from line 295
when mi=0).
On Thu, Nov 29,
: Invalid operation
collect2: ld returned 1 exit status
due to the DSO link change, we must explicitly link against every library
needed.
http://fedoraproject.org/wiki/UnderstandingDSOLinkChange
Signed-off-by: Cong Ding
---
scripts/kconfig/Makefile |1 +
1 files changed, 1 insertions(+), 0
In version 1, I forgot to modify the same bug in the first loop.
we have to call kobject_put() to clean up the kobject after function
kobject_init(), kobject_add(), or kobject_uevent() is called.
Signed-off-by: Cong Ding
---
drivers/uio/uio.c | 16 ++--
1 files changed, 10
Hi Hans, I think the memory allocated with kzalloc is properly freed
by calling kobject_put.
I can give a simple explanation.
1) when we call kobject_init, the parameter portio_attr_type is
passed in. portio_attr_type includes a function pointer to
portio_release, which releases the memory of
On Fri, Nov 30, 2012 at 10:33 PM, Hans J. Koch wrote:
> On Fri, Nov 30, 2012 at 12:12:46PM +0100, Tux9 wrote:
>> I like Vitalii's solution more. Hans's solution assign the value
>> -ENOMEM to ret in every round of the loop, which is a kind of wasting
>> CPU cycles.
>
> The difference between
> 1
On Sat, Dec 01, 2012 at 04:56:25AM +0100, Hans J. Koch wrote:
> On Sat, Dec 01, 2012 at 02:22:44AM +0100, Cong Ding wrote:
> > On Fri, Nov 30, 2012 at 10:33 PM, Hans J. Koch wrote:
> > > On Fri, Nov 30, 2012 at 12:12:46PM +0100, Tux9 wrote:
> > >> I like Vitalii's
it is unnecessary to check i<4 after the loop. just do it before the break.
Signed-off-by: Cong Ding
---
fs/ext4/hash.c |6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/ext4/hash.c b/fs/ext4/hash.c
index fa8e491..3d586f0 100644
--- a/fs/ext4/hash.c
+++ b/fs/e
it's not necessary to lock the buffers because no one touches them
beyond the file system.
Signed-off-by: Cong Ding
---
fs/ext3/resize.c |4
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/fs/ext3/resize.c b/fs/ext3/resize.c
index 0f814f3..f76fcd6 100644
--- a/fs/ext3
We do not allow old-style function definition. Always spell foo(void) if
a function does not take any parameters.
Signed-off-by: Cong Ding
---
drivers/scsi/gdth.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c
index 5d72274
We do not allow old-style function definition. Always spell foo(void) if
a function does not take any parameters.
Signed-off-by: Cong Ding
---
tools/virtio/virtio_test.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/virtio/virtio_test.c b/tools/virtio
We do not allow old-style function definition. Always spell foo(void) if
a function does not take any parameters.
Signed-off-by: Cong Ding
---
drivers/staging/telephony/ixj.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/telephony/ixj.c b/drivers
On Mon, Dec 03, 2012 at 01:56:09PM +0300, Dan Carpenter wrote:
> On Mon, Dec 03, 2012 at 10:34:08AM +0000, Cong Ding wrote:
> > We do not allow old-style function definition. Always spell foo(void) if
> > a function does not take any parameters.
> >
>
> You should be
the variable j isn't used in the loop
Signed-off-by: Cong Ding
---
drivers/staging/echo/echo.c |3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/echo/echo.c b/drivers/staging/echo/echo.c
index ca87ce9..14dfd91 100644
--- a/drivers/staging/echo/echo.c
"main2.c"
.text
.p2align 4,,15
.globl foo
[ding@GNU ~]$
> On Tue, Dec 4, 2012 at 10:46 PM, Santosh Shilimkar
> wrote:
> > On Tuesday 04 December 2012 07:25 PM, Grant Likely wrote:
> >>
> >> On Tue, Dec 4, 2012 at 11:44 AM, Santosh Shil
/sched/debug.c:225:2: warning: format ‘%ld’ expects argument of type
‘long int’, but argument 3 has type ‘long long int’ [-Wformat]
where function atomic64_read returns long long int, but %ld was used in the
printf
Signed-off-by: Cong Ding
---
kernel/sched/debug.c |2 +-
1 files changed, 1
116e Mon Sep 17 00:00:00 2001
From: Cong Ding
Date: Thu, 6 Dec 2012 15:58:15 +0100
Subject: [PATCH RFC -next] remove all the trailing blank space
clean all the trailing blank space by using shell command
$ find . -iname '*.[ch]' | xargs sed 's/\s\+$//g' -i
I have manually checked a random set of a
On Thu, Dec 06, 2012 at 08:06:06AM -0800, Greg Kroah-Hartman wrote:
> On Thu, Dec 06, 2012 at 03:42:20PM +0000, Cong Ding wrote:
> > On Thu, Dec 06, 2012 at 05:08:56PM +0800, Bin Wang wrote:
> > > This patch removes the trailing white space in fs/sysfs/mount.c.
> > >
&g
the variable "ret" might be uninitialized in the "default" branch of "switch"
Signed-off-by: Cong Ding
---
drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/core/en
ping Hans, did you have any comment on this?
- cong
On Fri, Nov 30, 2012 at 12:03 PM, Cong Ding wrote:
> Hi Hans, I think the memory allocated with kzalloc is properly freed
> by calling kobject_put.
>
> I can give a simple explanation.
>
> 1) when we call kobject_i
the ".config_intr" is defined twice in both line 208 and 212.
Signed-off-by: Cong Ding
---
drivers/net/phy/smsc.c |1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c
index 16dceed..5cee6bd 100644
--- a/drivers/net/
On Thu, Dec 06, 2012 at 05:59:21PM -0600, Patrick Trantham wrote:
> On 12/06/2012 05:16 PM, Cong Ding wrote:
> >the ".config_intr" is defined twice in both line 208 and 212.
> >
> >Signed-off-by: Cong Ding
> >---
> > drivers/net/phy/smsc.c |1
the variables zero and unres_qlen_max are only used when CONFIG_SYSCTL is
defined, otherwise it causes the following sparse warning when we turn on
CONFIG_SYSCTL.
Signed-off-by: Cong Ding
---
net/core/neighbour.c |2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/net/core
On Fri, Dec 07, 2012 at 12:06:44AM +, Cong Ding wrote:
> the variables zero and unres_qlen_max are only used when CONFIG_SYSCTL is
> defined, otherwise it causes the following sparse warning when we turn on
> CONFIG_SYSCTL.
sorry for disturbing again, the sparse warning is
net/core/ne
the function ecryptfs_encode_for_filename() is only used in this file
Signed-off-by: Cong Ding
---
fs/ecryptfs/crypto.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c
index ea99312..a7b0c2d 100644
--- a/fs/ecryptfs/crypto.c
On Fri, Dec 07, 2012 at 02:45:43PM -0800, H. Peter Anvin wrote:
> Patch description please?
there are 2 consts in the definition of one variable
- cong
>
> Cong Ding wrote:
>
> >
> >Signed-off-by: Cong Ding
> >---
> > arch/x86/tools/gen-insn-attr-x86.aw
On Fri, Dec 07, 2012 at 02:56:16PM -0800, H. Peter Anvin wrote:
> On 12/07/2012 02:49 PM, Cong Ding wrote:
> >On Fri, Dec 07, 2012 at 02:45:43PM -0800, H. Peter Anvin wrote:
> >>Patch description please?
> >there are 2 consts in the definition of one variable
> >
>
On Fri, Dec 07, 2012 at 03:06:13PM -0800, H. Peter Anvin wrote:
> On 12/07/2012 03:03 PM, Cong Ding wrote:
> >On Fri, Dec 07, 2012 at 02:56:16PM -0800, H. Peter Anvin wrote:
> >>On 12/07/2012 02:49 PM, Cong Ding wrote:
> >>>On Fri, Dec 07, 2012 at 02:45:43
On Sat, Dec 08, 2012 at 01:10:40AM +0100, Hans J. Koch wrote:
> On Fri, Dec 07, 2012 at 12:02:11AM +0100, Cong Ding wrote:
> > ping Hans, did you have any comment on this?
>
> Sounds right what you say. Is your patch v2 your final solution, or would
> you like to come up wi
nly in this file.
There is no reason to remove the static by sed command.
Signed-off-by: Cong Ding
---
drivers/tty/vt/Makefile |4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/vt/Makefile b/drivers/tty/vt/Makefile
index 14a51c9..17ae94c 100644
--- a/drivers/tty
remove trailing blank spaces in tty/hvc by shell command:
sed 's/\s\+$//g' -i
I have manually reviewed that everything is correct.
Signed-off-by: Cong Ding
---
drivers/tty/hvc/hvc_console.c |6 +++---
drivers/tty/hvc/hvc_xen.c |2 +-
drivers/tty/hvc/hvcs.c|4 ++--
3
remove trailing blank spaces in tty/vt by shell command:
sed 's/\s\+$//g' -i
I have manually reviewed that everything is correct.
Signed-off-by: Cong Ding
---
drivers/tty/vt/consolemap.c | 62 +-
drivers/tty/vt/keyboard.c |4 +-
drivers/tty/vt
Use WARN rather than printk followed by WARN_ON(1), for conciseness.
Signed-off-by: Cong Ding
---
drivers/ssb/main.c |3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c
index bd7115c..c82c5c9 100644
--- a/drivers/ssb/main.c
+++ b
>From 9523e1de9d2771dc66a5b645651fc9f4745eb685 Mon Sep 17 00:00:00 2001
From: Cong Ding
Date: Sun, 9 Dec 2012 08:06:20 +
Subject: [PATCH v3] x86: fix the error of using "const" in gen-insn-attr-x86.awk
x86: fix the error of using "const" in gen-insn-attr-x86.awk
Th
On Sun, Dec 09, 2012 at 02:24:55PM +0900, Masami Hiramatsu wrote:
> (2012/12/08 8:17), Cong Ding wrote:
> >>>>>> Patch description please?
> >>>>> there are 2 consts in the definition of one variable
> >>>>>
> >>>>
Ping Michal, did you have any comments on this?
- cong
On Thu, Nov 29, 2012 at 05:21:28PM +, Cong Ding wrote:
> when make menuconfig, it reports this error:
>
> /usr/bin/ld: scripts/kconfig/lxdialog/checklist.o: undefined reference to
> symbol 'acs_map'
> /usr/bin/ld:
ping!
- cong
On Mon, Dec 03, 2012 at 10:19:09AM +, Cong Ding wrote:
> We do not allow old-style function definition. Always spell foo(void) if
> a function does not take any parameters.
>
> Signed-off-by: Cong Ding
> ---
> drivers/scsi/gdth.c |2 +-
> 1 files
ping!
- cong
On Tue, Dec 04, 2012 at 01:21:44AM +, Cong Ding wrote:
> the variable j isn't used in the loop
>
> Signed-off-by: Cong Ding
> ---
> drivers/staging/echo/echo.c |3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/drive
this patch is to fix the following compilation warning:
lib/rbtree_test.c: In function ‘check’:
lib/rbtree_test.c:121: warning: ‘blacks’ may be used uninitialized in this
function
the use of variable blacks in line 133 might be uninitialized
Signed-off-by: Cong Ding
---
lib/rbtree_test.c
notate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
Signed-off-by: Cong Ding
---
drivers/w1/masters/w1-gpio.c |6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dr
On Tue, Dec 11, 2012 at 10:07:06AM -0500, Dave Jones wrote:
> (Taint comes from previous r600 bug reported here
> https://lkml.org/lkml/2012/12/8/131)
>
> [35662.070628] BUG: unable to handle kernel NULL pointer dereference at
> (null)
> [35662.071719] IP: []
On Thu, Jan 24, 2013 at 10:34:20AM -0500, Josef Bacik wrote:
> On Sat, Jan 19, 2013 at 08:27:45AM -0700, Cong Ding wrote:
> > The bug happens when rb_node == NULL. It causes variable node to be NULL and
> > then the NULL pointer is dereferenced this line:
> > BUG_ON((str
/sched/debug.c:225:2: warning: format ‘%ld’ expects argument of type
‘long int’, but argument 3 has type ‘long long int’ [-Wformat]
where function atomic64_read returns long long int, but %ld was used in the
printf
Signed-off-by: Cong Ding
---
resend because no reply for
Message-Id: <1354727440-20
On Wed, Nov 28, 2012 at 12:07 AM, Hans J. Koch wrote:
> On Tue, Nov 27, 2012 at 07:29:32PM +0200, Vitalii Demianets wrote:
>> Memory leak was caused by jumping to the wrong exit label. So, it is good
>> time
>> to improve misleading label names too.
>
> I agree that bad0, bad1, and bad2 are not
On Wed, Nov 28, 2012 at 1:37 AM, Hans J. Koch wrote:
> On Wed, Nov 28, 2012 at 01:07:26AM +0100, Cong Ding wrote:
>> On Wed, Nov 28, 2012 at 12:07 AM, Hans J. Koch wrote:
>> > On Tue, Nov 27, 2012 at 07:29:32PM +0200, Vitalii Demianets wrote:
>> >> Memory leak was
we have to call kobject_put() to clean up the kobject after function
kobject_init(), kobject_add(), or kobject_uevent() is called.
Signed-off-by: Cong Ding
---
drivers/uio/uio.c |8 +---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/uio/uio.c b/drivers/uio
usr/gen_init_cpio.c: remove unnecessary "if"
if it goes to fail, dname isn't allocated; otherwise, it is allocated
successfully. so we just free memory when it doesn't fail.
this patch also fix a trival trailing space warning by checkpatch
Signed-off-by: Cong Ding
---
usr/gen_i
the value of err is always negative if it goes to errout, so we don't need to
check the value of err.
Signed-off-by: Cong Ding
---
net/ipv6/addrconf.c |3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 6fca01f..408cac4a
On Tue, Dec 18, 2012 at 02:03:08PM -0800, Kees Cook wrote:
> [resend, busted mailer]
>
> On Tue, Dec 18, 2012 at 1:26 PM, Cong Ding wrote:
> >
> > usr/gen_init_cpio.c: remove unnecessary "if"
> >
> > if it goes to fail, dname isn't allocated; otherwi
On Tue, Dec 18, 2012 at 11:41:53PM +0100, Cong Ding wrote:
> On Tue, Dec 18, 2012 at 02:03:08PM -0800, Kees Cook wrote:
> > [resend, busted mailer]
> >
> > On Tue, Dec 18, 2012 at 1:26 PM, Cong Ding wrote:
> > >
> > > usr/gen_init_cpio.c: remove unnecess
clean the checkpatch warnings in ring_sw.c. mostly are 80 characters per line
issue.
Signed-off-by: Cong Ding
---
drivers/staging/iio/ring_sw.c | 25 ++---
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/iio/ring_sw.c b/drivers/staging/iio
we should check the return value of calling function fir16_create(): a NULL
value means the memory allocation fails.
this patch also cleans up the error handling in function function oslec_create()
Signed-off-by: Cong Ding
---
drivers/staging/echo/echo.c | 39
fix 80 characters issue
Signed-off-by: Cong Ding
---
kernel/wait.c |6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/kernel/wait.c b/kernel/wait.c
index 6698e0c..a80a9e4 100644
--- a/kernel/wait.c
+++ b/kernel/wait.c
@@ -10,7 +10,8 @@
#include
#include
-void
spaces are used for indent in 3 places of tty/pty.c, we change it to tab.
Signed-off-by: Cong Ding
---
drivers/tty/pty.c |6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
index 64fcbdb..358a5fe 100644
--- a/drivers/tty/pty.c
+++ b
the "\n" in panic message is excess, so we remove it in tty/pty.c as what it
is used in other places.
Signed-off-by: Cong Ding
---
drivers/tty/pty.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
index be6a373..64fc
Macros should be enclosed in parenthesis
Signed-off-by: Cong Ding
---
drivers/tty/rocket.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/rocket.c b/drivers/tty/rocket.c
index e42009a..e434a79 100644
--- a/drivers/tty/rocket.c
+++ b/drivers/tty/rocket.c
On Sun, Jan 13, 2013 at 9:10 AM, Chen Gang F T
wrote:
> Hello Antoine:
>
> after read through the whole reply of Linus Torvalds for it
> (the time stamp is "Wed, 16 Jan 2008 10:39:00 -0800 (PST)").
>
> at least for me, his reply is correct in details.
>
> although what you said is also
the variable cpuclk and clk_name should be properly freed.
Signed-off-by: Cong Ding
---
drivers/clk/mvebu/clk-cpu.c |9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/clk/mvebu/clk-cpu.c b/drivers/clk/mvebu/clk-cpu.c
index ff004578..1a0d84f 100644
the use if pointer fs should be after the null check.
Signed-off-by: Cong Ding
---
drivers/block/swim3.c |5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c
index d889f95..deb722d 100644
--- a/drivers/block/swim3.c
+++ b
in the printk, the variable t euqals to NULL, so there is no t->index, we use
v->tc->index instead.
Signed-off-by: Cong Ding
---
arch/mips/kernel/vpe.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c
index eec690a
the pointer cpu_pmu is used without null pointer dereference check, and is
checked after the using of it, so we move the null pointer check to before the
first use.
Signed-off-by: Cong Ding
---
arch/arm/kernel/perf_event_cpu.c | 14 --
1 file changed, 8 insertions(+), 6 deletions
the variable backup_current_thread_info isn't freed before existing the
function.
Signed-off-by: Cong Ding
---
arch/powerpc/kernel/kgdb.c |5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c
index 8747447..5ca82cd
On Mon, Jan 14, 2013 at 05:23:46PM +, Russell King - ARM Linux wrote:
> On Mon, Jan 14, 2013 at 05:18:53PM +0000, Cong Ding wrote:
> > the pointer cpu_pmu is used without null pointer dereference check, and is
> > checked after the using of it, so we move the null pointer
The NULL pointer check is not necessary. cpu_pmu_init() is called
after cpu_pmu has already been dereferenced by its caller:
cpu_pmu = pmu;
cpu_pmu->plat_device = pdev;
cpu_pmu_init(cpu_pmu);
Signed-off-by: Cong Ding
---
arch/arm/kernel/perf_event_cpu.c |2 +-
On Mon, Jan 14, 2013 at 11:19:15AM -0700, Bjorn Helgaas wrote:
> On Mon, Jan 14, 2013 at 10:53 AM, Cong Ding wrote:
> > we should ensure the pointer is not null before the first use, rather than
> > after it.
>
> These changes look technically correct, but the w
the variable err is uninitialized if all the macros in the function are
disabled.
Signed-off-by: Cong Ding
---
drivers/atm/fore200e.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c
index 204814e..d4725fc 100644
er common->sfdl_pcibus_info is passed. The
common->sfdl_pcibus_info is guaranteed to be not null by function
pcibr_bus_fixup() in file pcibr_provider.c.
The functions pcireg_int_ate_set and pcireg_int_ate_addr are similar as
pcireg_int_ate_set.
Signed-off-by: Cong Ding
---
arch/ia64/sn/pci/pc
the variable ttccs allocated isn't freed when error occurs, so we call kfree
before return.
Signed-off-by: Cong Ding
---
arch/arm/mach-zynq/timer.c | 25 -
1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/arch/arm/mach-zynq/timer.c b/arch/arm/mach-zynq
the variable iommu and strbuf are not freed if it goes to error.
Signed-off-by: Cong Ding
---
arch/sparc/kernel/sbus.c |8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/sparc/kernel/sbus.c b/arch/sparc/kernel/sbus.c
index 1271b3a..0b66e53 100644
--- a/arch
the variable inti should be freed in the branch CPUSTAT_STOPPED.
Signed-off-by: Cong Ding
---
arch/s390/kvm/sigp.c |4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/s390/kvm/sigp.c b/arch/s390/kvm/sigp.c
index 461e841..1c48ab2 100644
--- a/arch/s390/kvm/sigp.c
+++ b
there is an extra "} in the file, so we delete it.
Signed-off-by: Cong Ding
---
arch/avr32/boards/atngw100/mrmt.c |1 -
1 file changed, 1 deletion(-)
diff --git a/arch/avr32/boards/atngw100/mrmt.c
b/arch/avr32/boards/atngw100/mrmt.c
index f914319..7de083d 100644
--- a/arch/avr32/b
the macro CONFIG_ETRAXFS is used in wrong position - all the port[1] related
stuff should be used only when CONFIG_ETRAXFS is enabled.
Signed-off-by: Cong Ding
---
arch/cris/arch-v32/drivers/sync_serial.c |7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/cris
the variable dummy is used without initialization.
Signed-off-by: Cong Ding
---
arch/mips/cavium-octeon/executive/cvmx-l2c.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/cavium-octeon/executive/cvmx-l2c.c
b/arch/mips/cavium-octeon/executive/cvmx-l2c.c
index
the pointer cfg is dereferenced in line 594, so it's no reason to check null
again in line 620.
Signed-off-by: Cong Ding
---
drivers/dma/mmp_pdma.c |6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/dma/mmp_pdma.c b/drivers/dma/mmp_pdma.c
index c6d98c0..81d7b89
the variable chan is dereferenced in line 635, so it is no reason to check
null again in line 641.
Signed-off-by: Cong Ding
---
drivers/dma/sh/shdma-base.c |3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/dma/sh/shdma-base.c b/drivers/dma/sh/shdma-base.c
index f4cd946..4acb85a
the variable sender is dereferenced in line 190, so it is no reason to check
null again in line 198.
Signed-off-by: Cong Ding
---
drivers/gpu/drm/nouveau/nouveau_fence.c |8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.c
b
On Mon, Jan 14, 2013 at 08:57:09PM -0800, Eric Dumazet wrote:
> On Tue, 2013-01-15 at 12:47 +0800, Harvey Yang wrote:
> > The destination address daddr is faddr if source route option is set,
> > otherwise it is inet_daddr. So use if-else to assign the value.
> >
> > Signed-off-by: Harvey Yang
On Tue, Jan 15, 2013 at 10:39:23AM +, David Howells wrote:
> Cong Ding wrote:
>
> > the variable sender is dereferenced in line 190, so it is no reason to check
> > null again in line 198.
>
> Did you mean "The variable 'chan'"?
sorry, my fault. so shou
On Tue, Jan 15, 2013 at 03:13:00PM +0100, Gregory CLEMENT wrote:
> Dear Cong Ding,
>
> On 01/14/2013 06:18 PM, Cong Ding wrote:
> > the variable cpuclk and clk_name should be properly freed.
> >
>
> Thanks for reporting this memory leak and for your patch but I thin
>From 75c73077905b822be6e8a32a09d6b0cdb5e61763 Mon Sep 17 00:00:00 2001
From: Cong Ding
Date: Mon, 14 Jan 2013 18:06:26 +0100
Subject: [PATCH v2] clk: mvebu/clk-cpu.c: fix memory leakage
the variable cpuclk and clk_name should be properly freed when error happens.
Signed-off-by: Cong D
the variable chan is dereferenced in line 190, so it is no reason to check
null again in line 198.
Signed-off-by: Cong Ding
---
drivers/gpu/drm/nouveau/nouveau_fence.c |8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.c
b
On Tue, Jan 15, 2013 at 05:33:57PM +0100, Gregory CLEMENT wrote:
> On 01/15/2013 04:37 PM, Jason Cooper wrote:
> > Mike,
> >
> > On Tue, Jan 15, 2013 at 03:23:08PM +, Cong Ding wrote:
> >> From 75c73077905b822be6e8a32a09d6b0cdb5e61763 Mon Sep 17 00:00:00 2001
&
the variable cpuclk and clk_name should be properly freed when error happens.
Signed-off-by: Cong Ding
Acked-by: Jason Cooper
---
drivers/clk/mvebu/clk-cpu.c |9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/clk/mvebu/clk-cpu.c b/drivers/clk/mvebu/clk
If CONFIG_NF_CONNTRACK_ZONES is not defined, the variable ret might be
uninitialized when it goes to err1 through line 125 and 263 respectively.
So I change these goto err1 to return -EINVAL directly.
Signed-off-by: Cong Ding
---
net/netfilter/xt_CT.c |4 ++--
1 file changed, 2 insertions
On Tue, Jan 15, 2013 at 07:06:51PM +, Waskiewicz Jr, Peter P wrote:
> On Tue, 2013-01-15 at 19:58 +0100, Cong Ding wrote:
> > If CONFIG_NF_CONNTRACK_ZONES is not defined, the variable ret might be
> > uninitialized when it goes to err1 through line 125 and 263 respectively.
There is a memory leakage in variable sg if it goes to error.
Signed-off-by: Cong Ding
---
drivers/staging/omapdrm/omap_gem_dmabuf.c |6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/omapdrm/omap_gem_dmabuf.c
b/drivers/staging/omapdrm
The address of a variable is impossible to be null, so we remove the check.
Signed-off-by: Cong Ding
---
drivers/media/dvb-frontends/stv0900_core.c |7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/media/dvb-frontends/stv0900_core.c
b/drivers/media/dvb
The address of a variable is impossible to be null, so we remove the check.
Signed-off-by: Cong Ding
---
sorry for sending again. I didn't notice there are another 2 places with the
same issue.
- cong
drivers/media/dvb-frontends/stv0900_core.c | 14 --
drivers/media/dvb
1 - 100 of 268 matches
Mail list logo