[PATCH] btrfs: fix memory leakage

2013-10-27 Thread Cong Ding
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

[PATCH] btrfs: fix memory leakage

2013-10-27 Thread Cong Ding
The memory allocated to name by function extref_get_fields isn't properly freed when error occurs. Signed-off-by: Cong Ding ding...@gmail.com --- 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 index 79f057c

[PATCH] fs/9p: fix flags in the format of printf

2013-10-26 Thread Cong Ding
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

[PATCH] fs/9p: fix flags in the format of printf

2013-10-26 Thread Cong Ding
To print int value, we should use %d rather than %u. Signed-off-by: Cong Ding ding...@gmail.com --- 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

[PATCH] uio: fix memory leak

2013-10-25 Thread Cong Ding
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

[PATCH] uio: fix memory leak

2013-10-25 Thread Cong Ding
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 ding...@gmail.com --- drivers/uio/uio.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/uio

[PATCH] avr32: boards/atngw100/mrmt.c: fix building error

2013-07-27 Thread Cong Ding
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/

[PATCH] avr32: boards/atngw100/mrmt.c: fix building error

2013-07-27 Thread Cong Ding
there is an additional {, which causes building error. Signed-off-by: Cong Ding ding...@gmail.com --- 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

Re: [PATCH v2 1/1] uio.c: solve memory leak

2013-07-25 Thread Cong Ding
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

Re: [PATCH v2 1/1] uio.c: solve memory leak

2013-07-25 Thread Cong Ding
On Mon, May 27, 2013 at 12:14 AM, Cong Ding ding...@gmail.com wrote: On Thu, Apr 25, 2013 at 12:19 PM, Cong Ding ding...@gmail.com 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

Re: [PATCH v2 1/1] uio.c: solve memory leak

2013-05-26 Thread Cong Ding
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

Re: [PATCH v2 1/1] uio.c: solve memory leak

2013-05-26 Thread Cong Ding
On Thu, Apr 25, 2013 at 12:19 PM, Cong Ding ding...@gmail.com 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, Jan 18, 2013 at 10:05

Re: [PATCH v2 1/1] uio.c: solve memory leak

2013-04-25 Thread Cong Ding
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: > > > >

Re: [PATCH v2 1/1] uio.c: solve memory leak

2013-04-25 Thread Cong Ding
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: On Tue, Dec 11, 2012 at 2:21 AM, Hans J

Re: [PATCH v2 1/1] uio.c: solve memory leak

2013-02-14 Thread Cong Ding
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: > > > On Tue, Dec 11, 2012 at 2:21 AM, Hans J. Koch wrote: > > > > On T

[PATCH v3] i2c: busses/i2c-pxa.c: fix potential null pointer dereference error

2013-02-14 Thread Cong Ding
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. The correct way should be using devm_kzalloc rather than kzalloc to allocate memory. Signed-off-by: Cong Ding --- drivers/i2c/busses/i2c-pxa.c

[PATCH v2] dma: of-dma.c: fix memory leakage

2013-02-14 Thread Cong Ding
The memory allocated to ofdma might be a leakage when error occurs. Signed-off-by: Cong Ding --- drivers/dma/of-dma.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/dma/of-dma.c b/drivers/dma/of-dma.c index 59631b2..583e50e3 100644 --- a/drivers/dma/of-dma.c +++ b/drivers/dma

[PATCH v2] dma: of-dma.c: fix memory leakage

2013-02-14 Thread Cong Ding
The memory allocated to ofdma might be a leakage when error occurs. Signed-off-by: Cong Ding ding...@gmail.com --- drivers/dma/of-dma.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/dma/of-dma.c b/drivers/dma/of-dma.c index 59631b2..583e50e3 100644 --- a/drivers/dma/of-dma.c

[PATCH v3] i2c: busses/i2c-pxa.c: fix potential null pointer dereference error

2013-02-14 Thread Cong Ding
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. The correct way should be using devm_kzalloc rather than kzalloc to allocate memory. Signed-off-by: Cong Ding ding...@gmail.com --- drivers/i2c

Re: [PATCH v2 1/1] uio.c: solve memory leak

2013-02-14 Thread Cong Ding
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: On Tue, Dec 11, 2012 at 2:21 AM, Hans J. Koch h...@hansjkoch.de wrote: On Thu, Nov 29, 2012 at 05

Re: [PATCH] of: dma.c: fix memory leakage

2013-02-13 Thread Cong Ding
On Tue, Feb 12, 2013 at 09:40:25AM -0800, Vinod Koul wrote: > On Tue, Jan 22, 2013 at 10:10:53AM +0000, Cong Ding wrote: > > On Sun, Jan 20, 2013 at 04:24:49PM -0600, Rob Herring wrote: > > > On 01/19/2013 07:06 AM, Cong Ding wrote: > > > > The memory allocated to

Re: [PATCH] of: dma.c: fix memory leakage

2013-02-13 Thread Cong Ding
On Tue, Feb 12, 2013 at 09:40:25AM -0800, Vinod Koul wrote: On Tue, Jan 22, 2013 at 10:10:53AM +, Cong Ding wrote: On Sun, Jan 20, 2013 at 04:24:49PM -0600, Rob Herring wrote: On 01/19/2013 07:06 AM, Cong Ding wrote: The memory allocated to ofdma might be a leakage when error occurs

[PATCH] net: mac80211/cfg.c: fix error using of sizeof()

2013-02-06 Thread Cong Ding
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

[PATCH] net: mac80211/cfg.c: fix error using of sizeof()

2013-02-06 Thread Cong Ding
Using 'sizeof' on array given as function argument returns size of a pointer rather than the size of array. Signed-off-by: Cong Ding ding...@gmail.com --- 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

Re: [PATCH v2] i2c: busses/i2c-pxa.c: fix potential null pointer dereference error

2013-02-05 Thread Cong Ding
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

Re: [PATCH v2] i2c: busses/i2c-pxa.c: fix potential null pointer dereference error

2013-02-05 Thread Cong Ding
On Tue, Feb 05, 2013 at 09:14:08AM +0800, Haojian Zhuang wrote: On Tue, Feb 5, 2013 at 8:05 AM, Cong Ding ding...@gmail.com 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_region. Signed

[PATCH v2] i2c: busses/i2c-pxa.c: fix potential null pointer dereference error

2013-02-04 Thread Cong Ding
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

Re: [PATCH] i2c: busses/i2c-pxa.c: fix potential null pointer dereference error

2013-02-04 Thread Cong Ding
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

[PATCH] infiniband: hw/cxgb3/iwch_provider.c: fix uninitialized variable issue

2013-02-04 Thread Cong Ding
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

[PATCH] net: wireless/rtlwifi: fix uninitialized variable issue

2013-02-04 Thread Cong Ding
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

[PATCH] net: wireless/rtlwifi: fix uninitialized variable issue

2013-02-04 Thread Cong Ding
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 ding...@gmail.com --- drivers/net/wireless/rtlwifi/rtl8192ce/trx.c |2 +- drivers/net/wireless/rtlwifi/rtl8192cu/mac.c

[PATCH] infiniband: hw/cxgb3/iwch_provider.c: fix uninitialized variable issue

2013-02-04 Thread Cong Ding
The variable npages might be used uninitialized in line 594. Signed-off-by: Cong Ding ding...@gmail.com --- 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

Re: [PATCH] i2c: busses/i2c-pxa.c: fix potential null pointer dereference error

2013-02-04 Thread Cong Ding
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 ding...@gmail.com 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_region

[PATCH v2] i2c: busses/i2c-pxa.c: fix potential null pointer dereference error

2013-02-04 Thread Cong Ding
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 ding...@gmail.com --- drivers/i2c/busses/i2c-pxa.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[tip:x86/boot] x86/boot: Fix minor fd leakage in tools/relocs.c

2013-01-27 Thread tip-bot for Cong Ding
Commit-ID: 65315d4889d403ea025081d8ca85ddf7b9c10f39 Gitweb: http://git.kernel.org/tip/65315d4889d403ea025081d8ca85ddf7b9c10f39 Author: Cong Ding AuthorDate: Mon, 14 Jan 2013 17:13:35 + Committer: H. Peter Anvin CommitDate: Sun, 27 Jan 2013 10:24:28 -0800 x86/boot: Fix minor fd

[PATCH resend] sched: fix compilation warning

2013-01-27 Thread Cong Ding
/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

[PATCH resend] sched: fix compilation warning

2013-01-27 Thread Cong Ding
/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 ding...@gmail.com --- resend because no reply for Message-Id

[tip:x86/boot] x86/boot: Fix minor fd leakage in tools/relocs.c

2013-01-27 Thread tip-bot for Cong Ding
Commit-ID: 65315d4889d403ea025081d8ca85ddf7b9c10f39 Gitweb: http://git.kernel.org/tip/65315d4889d403ea025081d8ca85ddf7b9c10f39 Author: Cong Ding ding...@gmail.com AuthorDate: Mon, 14 Jan 2013 17:13:35 + Committer: H. Peter Anvin h...@linux.intel.com CommitDate: Sun, 27 Jan 2013 10:24

Re: [PATCH] btrfs: fix potential null pointer dereference bug

2013-01-24 Thread Cong Ding
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

[tip:x86/platform] x86/apb/timer: Remove unnecessary "if"

2013-01-24 Thread tip-bot for Cong Ding
Commit-ID: b9975dabe3f0a6e4d1af52c47f66b5558df207a3 Gitweb: http://git.kernel.org/tip/b9975dabe3f0a6e4d1af52c47f66b5558df207a3 Author: Cong Ding AuthorDate: Mon, 14 Jan 2013 22:39:18 +0100 Committer: Ingo Molnar CommitDate: Thu, 24 Jan 2013 13:03:26 +0100 x86/apb/timer: Remove

[tip:x86/boot] x86/boot: Fix minor fd leakage in tools/relocs.c

2013-01-24 Thread tip-bot for Cong Ding
Commit-ID: 585376216a829d1ddfb3e57cb50c72c23adb484f Gitweb: http://git.kernel.org/tip/585376216a829d1ddfb3e57cb50c72c23adb484f Author: Cong Ding AuthorDate: Mon, 14 Jan 2013 17:13:35 + Committer: Ingo Molnar CommitDate: Thu, 24 Jan 2013 13:07:23 +0100 x86/boot: Fix minor fd

[tip:x86/boot] x86/boot: Fix minor fd leakage in tools/relocs.c

2013-01-24 Thread tip-bot for Cong Ding
Commit-ID: 585376216a829d1ddfb3e57cb50c72c23adb484f Gitweb: http://git.kernel.org/tip/585376216a829d1ddfb3e57cb50c72c23adb484f Author: Cong Ding ding...@gmail.com AuthorDate: Mon, 14 Jan 2013 17:13:35 + Committer: Ingo Molnar mi...@kernel.org CommitDate: Thu, 24 Jan 2013 13:07:23

[tip:x86/platform] x86/apb/timer: Remove unnecessary if

2013-01-24 Thread tip-bot for Cong Ding
Commit-ID: b9975dabe3f0a6e4d1af52c47f66b5558df207a3 Gitweb: http://git.kernel.org/tip/b9975dabe3f0a6e4d1af52c47f66b5558df207a3 Author: Cong Ding ding...@gmail.com AuthorDate: Mon, 14 Jan 2013 22:39:18 +0100 Committer: Ingo Molnar mi...@kernel.org CommitDate: Thu, 24 Jan 2013 13:03:26

Re: [PATCH] btrfs: fix potential null pointer dereference bug

2013-01-24 Thread Cong Ding
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((struct btrfs_root *)node-data

Re: LKML and other vger MLs - which provider...

2013-01-23 Thread Cong Ding
On Wed, Jan 23, 2013 at 10:32:39PM +0100, Guennadi Liakhovetski wrote: > Hi David > > In short: I'm looking for a (free) email provider to use for my > vger.kernel.org subscriptions. Read a thread on google+ with your > participation and was wondering whether you could recommend one or knew of

Re: [PATCH] net/ceph/osdmap.c: fix undefined behavior when using snprintf()

2013-01-23 Thread Cong Ding
On Wed, Jan 23, 2013 at 10:48:07AM -0600, Alex Elder wrote: > On 01/22/2013 01:20 PM, Cong Ding wrote: > > The variable "str" is used as both the source and destination in function > > snprintf(), which is undefined behavior based on C11. The original &

Re: [PATCH] net/ceph/osdmap.c: fix undefined behavior when using snprintf()

2013-01-23 Thread Cong Ding
On Wed, Jan 23, 2013 at 10:48:07AM -0600, Alex Elder wrote: On 01/22/2013 01:20 PM, Cong Ding wrote: The variable str is used as both the source and destination in function snprintf(), which is undefined behavior based on C11. The original description in C11 is: If copying takes

Re: LKML and other vger MLs - which provider...

2013-01-23 Thread Cong Ding
On Wed, Jan 23, 2013 at 10:32:39PM +0100, Guennadi Liakhovetski wrote: Hi David In short: I'm looking for a (free) email provider to use for my vger.kernel.org subscriptions. Read a thread on google+ with your participation and was wondering whether you could recommend one or knew of a

[PATCH] fs/cifs/cifs_dfs_ref.c: fix potential memory leakage

2013-01-22 Thread Cong Ding
When it goes to error through line 144, the memory allocated to *devname is not freed, and the caller doesn't free it either in line 250. So we free the memroy of *devname in function cifs_compose_mount_options() when it goes to error. Signed-off-by: Cong Ding --- fs/cifs/cifs_dfs_ref.c |2

[PATCH] net/ceph/osdmap.c: fix undefined behavior when using snprintf()

2013-01-22 Thread Cong Ding
busy path and saves a few lines of code). Signed-off-by: Cong Ding --- net/ceph/osdmap.c | 27 --- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c index de73214..3131a99d3 100644 --- a/net/ceph/osdmap.c +++ b/net/c

Re: [PATCH] of: dma.c: fix memory leakage

2013-01-22 Thread Cong Ding
On Sun, Jan 20, 2013 at 04:24:49PM -0600, Rob Herring wrote: > On 01/19/2013 07:06 AM, Cong Ding wrote: > > The memory allocated to ofdma might be a leakage when error occurs. > > > > Signed-off-by: Cong Ding > > You need to send this to whomever is working on DMA

Re: [PATCH] of: dma.c: fix memory leakage

2013-01-22 Thread Cong Ding
On Sun, Jan 20, 2013 at 04:24:49PM -0600, Rob Herring wrote: On 01/19/2013 07:06 AM, Cong Ding wrote: The memory allocated to ofdma might be a leakage when error occurs. Signed-off-by: Cong Ding ding...@gmail.com You need to send this to whomever is working on DMA bindings. Thank you

[PATCH] net/ceph/osdmap.c: fix undefined behavior when using snprintf()

2013-01-22 Thread Cong Ding
). Signed-off-by: Cong Ding ding...@gmail.com --- net/ceph/osdmap.c | 27 --- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c index de73214..3131a99d3 100644 --- a/net/ceph/osdmap.c +++ b/net/ceph/osdmap.c @@ -13,26 +13,15

[PATCH] fs/cifs/cifs_dfs_ref.c: fix potential memory leakage

2013-01-22 Thread Cong Ding
When it goes to error through line 144, the memory allocated to *devname is not freed, and the caller doesn't free it either in line 250. So we free the memroy of *devname in function cifs_compose_mount_options() when it goes to error. Signed-off-by: Cong Ding ding...@gmail.com --- fs/cifs

[PATCH] btrfs: fix potential null pointer dereference bug

2013-01-19 Thread Cong Ding
ere has to be something unknown thing wrong), so I replace "if (rb_node)" with UG_ON(!rb_node). Signed-off-by: Cong Ding --- fs/btrfs/relocation.c |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 17c

[PATCH] of: dma.c: fix memory leakage

2013-01-19 Thread Cong Ding
The memory allocated to ofdma might be a leakage when error occurs. Signed-off-by: Cong Ding --- drivers/of/dma.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/of/dma.c b/drivers/of/dma.c index 59631b2..583e50e3 100644 --- a/drivers/of/dma.c +++ b/drivers/of/dma.c @@ -107,6

Re: [PATCH v2] kvm tools: remove redundant "if" condition

2013-01-19 Thread Cong Ding
On Sat, Jan 19, 2013 at 10:58:33AM +0200, Pekka Enberg wrote: > On Wed, Jan 16, 2013 at 6:52 PM, Cong Ding wrote: > > After we check (state.kcount != 0), state.kcount has to be 0 in all the > > "else" > > branchs. > > > > Signed-off-by: Cong Din

Re: [PATCH v2] kvm tools: remove redundant if condition

2013-01-19 Thread Cong Ding
On Sat, Jan 19, 2013 at 10:58:33AM +0200, Pekka Enberg wrote: On Wed, Jan 16, 2013 at 6:52 PM, Cong Ding ding...@gmail.com wrote: After we check (state.kcount != 0), state.kcount has to be 0 in all the else branchs. Signed-off-by: Cong Ding ding...@gmail.com --- tools/kvm/hw/i8042

[PATCH] of: dma.c: fix memory leakage

2013-01-19 Thread Cong Ding
The memory allocated to ofdma might be a leakage when error occurs. Signed-off-by: Cong Ding ding...@gmail.com --- drivers/of/dma.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/of/dma.c b/drivers/of/dma.c index 59631b2..583e50e3 100644 --- a/drivers/of/dma.c +++ b/drivers

[PATCH] btrfs: fix potential null pointer dereference bug

2013-01-19 Thread Cong Ding
has to be something unknown thing wrong), so I replace if (rb_node) with UG_ON(!rb_node). Signed-off-by: Cong Ding ding...@gmail.com --- fs/btrfs/relocation.c |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 17c306b

Re: [PATCH] Staging: zcache-main: Fixed Camel Case Issue

2013-01-18 Thread Cong Ding
On Fri, Jan 18, 2013 at 09:56:44PM -0500, Jake Champlin wrote: > Fixed a camel case coding style issue. > > Signed-off-by: Jake Champlin > --- > drivers/staging/zcache/zcache-main.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git

Re: [PATCH] udf: add extent cache support in case of file reading

2013-01-18 Thread Cong Ding
On Sat, Jan 19, 2013 at 11:17:14AM +0900, Namjae Jeon wrote: > From: Namjae Jeon > > This patch implements extent caching in case of file reading. > While reading a file, currently, UDF reads metadata serially > which takes a lot of time depending on the number of extents present > in the file.

[PATCH] include/keys/system_keyring.h: fix building error

2013-01-18 Thread Cong Ding
undeclared (first use in this function) kernel/module_signing.c:161:36: note: each undeclared identifier is reported only once for each function it appears in Signed-off-by: Cong Ding --- include/keys/system_keyring.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/in

[PATCH] fs: timerfd.c: fix build error

2013-01-18 Thread Cong Ding
Invalid number of parentheses if macro COMPAT is defined Signed-off-by: Cong Ding --- fs/timerfd.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/timerfd.c b/fs/timerfd.c index 14ad4f3..0e606b1 100644 --- a/fs/timerfd.c +++ b/fs/timerfd.c @@ -396,7 +396,7

Re: [PATCH v2 1/1] uio.c: solve memory leak

2013-01-18 Thread Cong Ding
On Tue, Dec 11, 2012 at 2:21 AM, Hans J. Koch wrote: > On Thu, Nov 29, 2012 at 05:40:00PM +0000, Cong Ding wrote: >> 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 >>

Re: [PATCH] scsi:gdth.c: fix compilation warning

2013-01-18 Thread Cong Ding
Hi all, is this still in the queue or...? - cong On Mon, Dec 3, 2012 at 11:19 AM, 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/gdt

Re: [PATCH] sched: fix compilation warning

2013-01-18 Thread Cong Ding
Is this patch still queued or...? - cong On Wed, Dec 5, 2012 at 6:10 PM, Cong Ding wrote: > the following compilation warning is caused by Commit-ID: > c566e8e9e44b72b53091da20e2dedefc730f2ee2 > > kernel/sched/debug.c: In function ‘print_cfs_rq’: > kernel/sched/debug.c:225:2:

[PATCH] iommu: omap-iommu.c: remove unnecessary null pointer check

2013-01-18 Thread Cong Ding
The pointer obj is dereferenced in line 146 and 149 respectively, so it is not necessary to check null again in line 149 and 175. And I have checked that all the callers of these two functions guarantee the parameter obj passed is not null. Signed-off-by: Cong Ding --- drivers/iommu/omap

[PATCH] iommu: omap-iommu.c: remove unnecessary null pointer check

2013-01-18 Thread Cong Ding
The pointer obj is dereferenced in line 146 and 149 respectively, so it is not necessary to check null again in line 149 and 175. And I have checked that all the callers of these two functions guarantee the parameter obj passed is not null. Signed-off-by: Cong Ding ding...@gmail.com --- drivers

Re: [PATCH] sched: fix compilation warning

2013-01-18 Thread Cong Ding
Is this patch still queued or...? - cong On Wed, Dec 5, 2012 at 6:10 PM, Cong Ding ding...@gmail.com wrote: the following compilation warning is caused by Commit-ID: c566e8e9e44b72b53091da20e2dedefc730f2ee2 kernel/sched/debug.c: In function ‘print_cfs_rq’: kernel/sched/debug.c:225:2

Re: [PATCH] scsi:gdth.c: fix compilation warning

2013-01-18 Thread Cong Ding
Hi all, is this still in the queue or...? - cong On Mon, Dec 3, 2012 at 11:19 AM, Cong Ding ding...@gmail.com 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 ding...@gmail.com --- drivers

Re: [PATCH v2 1/1] uio.c: solve memory leak

2013-01-18 Thread Cong Ding
On Tue, Dec 11, 2012 at 2:21 AM, Hans J. Koch h...@hansjkoch.de wrote: On Thu, Nov 29, 2012 at 05:40:00PM +, Cong Ding wrote: 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

[PATCH] fs: timerfd.c: fix build error

2013-01-18 Thread Cong Ding
Invalid number of parentheses if macro COMPAT is defined Signed-off-by: Cong Ding ding...@gmail.com --- fs/timerfd.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/timerfd.c b/fs/timerfd.c index 14ad4f3..0e606b1 100644 --- a/fs/timerfd.c +++ b/fs/timerfd.c @@ -396,7

[PATCH] include/keys/system_keyring.h: fix building error

2013-01-18 Thread Cong Ding
(first use in this function) kernel/module_signing.c:161:36: note: each undeclared identifier is reported only once for each function it appears in Signed-off-by: Cong Ding ding...@gmail.com --- include/keys/system_keyring.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include

Re: [PATCH] udf: add extent cache support in case of file reading

2013-01-18 Thread Cong Ding
On Sat, Jan 19, 2013 at 11:17:14AM +0900, Namjae Jeon wrote: From: Namjae Jeon namjae.j...@samsung.com This patch implements extent caching in case of file reading. While reading a file, currently, UDF reads metadata serially which takes a lot of time depending on the number of extents

Re: [PATCH] Staging: zcache-main: Fixed Camel Case Issue

2013-01-18 Thread Cong Ding
On Fri, Jan 18, 2013 at 09:56:44PM -0500, Jake Champlin wrote: Fixed a camel case coding style issue. Signed-off-by: Jake Champlin jake.champlin...@gmail.com --- drivers/staging/zcache/zcache-main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v3] sparc: kernel/sbus.c: fix memory leakage

2013-01-17 Thread Cong Ding
The variable iommu and strbuf are not freed properly if it goes to error. Signed-off-by: Cong Ding --- arch/sparc/kernel/sbus.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/sparc/kernel/sbus.c b/arch/sparc/kernel/sbus.c index 1271b3a..be5bdf9 100644

Re: [PATCH v2] sparc: kernel/sbus.c: fix memory leakage

2013-01-17 Thread Cong Ding
On Thu, Jan 17, 2013 at 12:30:11PM +, Richard Mortimer wrote: > > > On 17/01/2013 11:56, Cong Ding wrote: > >On Thu, Jan 17, 2013 at 10:41:59AM +, Richard Mortimer wrote: > >> > >> > >>On 16/01/2013 22:01, Cong Ding wrote: > >>>

Re: [PATCH v2] sparc: kernel/sbus.c: fix memory leakage

2013-01-17 Thread Cong Ding
On Thu, Jan 17, 2013 at 10:41:59AM +, Richard Mortimer wrote: > > > On 16/01/2013 22:01, Cong Ding wrote: > >the variable iommu and strbuf are not freed if it goes to error. > > > >Signed-off-by: Cong Ding > >--- > > arch/sparc/kernel/sbus.c |

Re: [PATCH v2] sparc: kernel/sbus.c: fix memory leakage

2013-01-17 Thread Cong Ding
On Thu, Jan 17, 2013 at 10:41:59AM +, Richard Mortimer wrote: On 16/01/2013 22:01, Cong Ding wrote: the variable iommu and strbuf are not freed if it goes to error. Signed-off-by: Cong Ding ding...@gmail.com --- arch/sparc/kernel/sbus.c |2 ++ 1 file changed, 2 insertions

Re: [PATCH v2] sparc: kernel/sbus.c: fix memory leakage

2013-01-17 Thread Cong Ding
On Thu, Jan 17, 2013 at 12:30:11PM +, Richard Mortimer wrote: On 17/01/2013 11:56, Cong Ding wrote: On Thu, Jan 17, 2013 at 10:41:59AM +, Richard Mortimer wrote: On 16/01/2013 22:01, Cong Ding wrote: the variable iommu and strbuf are not freed if it goes to error. Signed-off

[PATCH v3] sparc: kernel/sbus.c: fix memory leakage

2013-01-17 Thread Cong Ding
The variable iommu and strbuf are not freed properly if it goes to error. Signed-off-by: Cong Ding ding...@gmail.com --- arch/sparc/kernel/sbus.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/sparc/kernel/sbus.c b/arch/sparc/kernel/sbus.c index 1271b3a

[PATCH] tty: serial/68328serial.c: remove unnecessary null pointer check

2013-01-16 Thread Cong Ding
The pointer info is dereferened in line 1009, so it is not necessary to check null again in line 1012. Signed-off-by: Cong Ding --- drivers/tty/serial/68328serial.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/68328serial.c b/drivers/tty/serial

[PATCH] tty: serial/vt8500_serial.c: fix bug caused by missing "{}"

2013-01-16 Thread Cong Ding
It is obviously here should be braced by "{}" in the "if" branch (more than 1 line in the "if" branch), and by the coding style document of the kernel I also add "{}" to the else branch. Signed-off-by: Cong Ding --- drivers/tty/serial/vt8500_serial.c |

[PATCH v2] sparc: kernel/sbus.c: fix memory leakage

2013-01-16 Thread Cong Ding
the variable iommu and strbuf are not freed if it goes to error. Signed-off-by: Cong Ding --- arch/sparc/kernel/sbus.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/sparc/kernel/sbus.c b/arch/sparc/kernel/sbus.c index 1271b3a..78aa26b 100644 --- a/arch/sparc/kernel/sbus.c +++ b

Re: [PATCH] sparc: kernel/sbus.c: fix memory leakage

2013-01-16 Thread Cong Ding
On Wed, Jan 16, 2013 at 10:13:09PM +0100, Sam Ravnborg wrote: > On Mon, Jan 14, 2013 at 10:36:08PM +0100, Cong Ding wrote: > > the variable iommu and strbuf are not freed if it goes to error. > > > > Signed-off-by: Cong Ding > > --- > > arch/sparc/kernel/s

[PATCH v2] kvm tools: close opened file

2013-01-16 Thread Cong Ding
The file should be closed before return. Signed-off-by: Cong Ding --- tools/kvm/builtin-setup.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/kvm/builtin-setup.c b/tools/kvm/builtin-setup.c index c5b0566..8b45c56 100644 --- a/tools/kvm/builtin-setup.c +++ b

[PATCH v2] kvm tools: remove redundant "if" condition

2013-01-16 Thread Cong Ding
After we check (state.kcount != 0), state.kcount has to be 0 in all the "else" branchs. Signed-off-by: Cong Ding --- tools/kvm/hw/i8042.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/kvm/hw/i8042.c b/tools/kvm/hw/i8042.c index 9f8be6a..9035732 100644 -

[PATCH v2] kvm tools: remove redundant if condition

2013-01-16 Thread Cong Ding
After we check (state.kcount != 0), state.kcount has to be 0 in all the else branchs. Signed-off-by: Cong Ding ding...@gmail.com --- tools/kvm/hw/i8042.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/kvm/hw/i8042.c b/tools/kvm/hw/i8042.c index 9f8be6a..9035732

[PATCH v2] kvm tools: close opened file

2013-01-16 Thread Cong Ding
The file should be closed before return. Signed-off-by: Cong Ding ding...@gmail.com --- tools/kvm/builtin-setup.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/kvm/builtin-setup.c b/tools/kvm/builtin-setup.c index c5b0566..8b45c56 100644 --- a/tools/kvm

Re: [PATCH] sparc: kernel/sbus.c: fix memory leakage

2013-01-16 Thread Cong Ding
On Wed, Jan 16, 2013 at 10:13:09PM +0100, Sam Ravnborg wrote: On Mon, Jan 14, 2013 at 10:36:08PM +0100, Cong Ding wrote: the variable iommu and strbuf are not freed if it goes to error. Signed-off-by: Cong Ding ding...@gmail.com --- arch/sparc/kernel/sbus.c |8 ++-- 1 file

[PATCH v2] sparc: kernel/sbus.c: fix memory leakage

2013-01-16 Thread Cong Ding
the variable iommu and strbuf are not freed if it goes to error. Signed-off-by: Cong Ding ding...@gmail.com --- arch/sparc/kernel/sbus.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/sparc/kernel/sbus.c b/arch/sparc/kernel/sbus.c index 1271b3a..78aa26b 100644 --- a/arch/sparc

[PATCH] tty: serial/vt8500_serial.c: fix bug caused by missing {}

2013-01-16 Thread Cong Ding
It is obviously here should be braced by {} in the if branch (more than 1 line in the if branch), and by the coding style document of the kernel I also add {} to the else branch. Signed-off-by: Cong Ding ding...@gmail.com --- drivers/tty/serial/vt8500_serial.c |5 +++-- 1 file changed, 3

[PATCH] tty: serial/68328serial.c: remove unnecessary null pointer check

2013-01-16 Thread Cong Ding
The pointer info is dereferened in line 1009, so it is not necessary to check null again in line 1012. Signed-off-by: Cong Ding ding...@gmail.com --- drivers/tty/serial/68328serial.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/68328serial.c b/drivers

[PATCH] kvm: remove redundant "if" condition

2013-01-15 Thread Cong Ding
After we check (state.kcount != 0), state.kcount has to be 0 in all the "else" branchs. Signed-off-by: Cong Ding --- tools/kvm/hw/i8042.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/kvm/hw/i8042.c b/tools/kvm/hw/i8042.c index 9f8be6a..9035732 100644 -

[PATCH] kvm: close opened file

2013-01-15 Thread Cong Ding
The file should be closed before return. Signed-off-by: Cong Ding --- tools/kvm/builtin-setup.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/kvm/builtin-setup.c b/tools/kvm/builtin-setup.c index c5b0566..8b45c56 100644 --- a/tools/kvm/builtin-setup.c +++ b

[PATCH v] media: dvb-frontends: remove unnecessary null pointer check

2013-01-15 Thread Cong Ding
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

[PATCH] media: dvb-frontends/stv0900_core.c: remove unnecessary null pointer check

2013-01-15 Thread Cong Ding
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

[PATCH] staging: omapdrm/omap_gem_dmabuf.c: fix memory leakage

2013-01-15 Thread Cong Ding
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

Re: [PATCH] net: netfilter/xt_CT.c: fix uninitialized variable

2013-01-15 Thread Cong Ding
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.

  1   2   3   >