[Consult] gifts to Red Hat.

2012-10-31 Thread Chen Gang
- 于 2012年10月24日 19:07, Ric Wheeler 写道: On 10/24/2012 06:24 AM, Chen Gang wrote: Hi Ric, 1) I have sent to this mail to linux-...@vger.kernel.org. Great! What you need to do is to post the question there and also a test

[Suggestion] net-ipv6: format %8s change to %16s in rt6_info_route function of route.c

2012-11-01 Thread Chen Gang
: ); -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ

Re: [Suggestion] net-ipv6: format %8s change to %16s in rt6_info_route function of route.c

2012-11-01 Thread Chen Gang
be outputted correctly) B) it is only effect with name len is less than 8 (it will fill some ' ' before the name) C) this is the reason why I call it beautiful, not a bug. [1] : http://git.kernel.org/?p=linux/kernel/git/davem/net-next.git;a=summary I will reference it, thanks. -- Chen

[Consult] for many minor and trivial patches about * change %8s to %s *

2012-11-05 Thread Chen Gang
-kernel@vger.kernel.org. iii) or each minor and trivial patch is an individual. 3) Suggestion: A) I prefer the first choice (let each subsystem only has one patch) B) I will do it according to the first choice, until get another suggestions. thanks. -- Chen Gang Asianux Corporation

[Result] total stat for * %8s * in kernel region

2012-11-06 Thread Chen Gang
additional communications with each other. thanks. -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read

[Bug fix] nfs-client: fix nfs_inode_attrs_need_update for async read_done comes during truncating to smaller size

2012-10-14 Thread Chen Gang
- Thanks. -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http

Re: [Bug fix] nfs-client: fix nfs_inode_attrs_need_update for async read_done comes during truncating to smaller size

2012-10-14 Thread Chen Gang
=none,addr=10.1.0.139 0 0 root@dhcp159:/opt/ltp/testscripts# -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read

Re: [Bug fix] nfs-client: fix nfs_inode_attrs_need_update for async read_done comes during truncating to smaller size

2012-10-14 Thread Chen Gang
于 2012年10月15日 12:52, Chen Gang 写道: Now, what are the conditions of your test setup? The above bug report is meaningless unless it includes a description of what is being exported by the server (including a proper listing of the contents of /etc/exports and /proc/mounts). It should also

Re: [Bug fix] nfs-client: fix nfs_inode_attrs_need_update for async read_done comes during truncating to smaller size

2012-10-15 Thread Chen Gang
will cause kernel stable issue, but for net test, LTP use different machine (I got our issue from LTP net test). -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http

Re: [Bug fix] nfs-client: fix nfs_inode_attrs_need_update for async read_done comes during truncating to smaller size

2012-10-15 Thread Chen Gang
too. -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [Bug fix] nfs-client: fix nfs_inode_attrs_need_update for async read_done comes during truncating to smaller size

2012-10-16 Thread Chen Gang
relative with current issue, so I have to skip it (although I think these contents are valulable for Trond) -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http

Re: [Bug fix] nfs-client: fix nfs_inode_attrs_need_update for async read_done comes during truncating to smaller size

2012-10-16 Thread Chen Gang
this implementation bug in nfs-client region. -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http

Re: [PATCH v2] kernel: kallsyms: memory override issue, need check destination buffer length

2013-04-14 Thread Chen Gang
On 2013年04月15日 10:05, Rusty Russell wrote: Chen Gang gang.c...@asianux.com writes: We don't export any symbols 128 characters, but if we did then kallsyms_expand_symbol() would overflow the buffer handed to it. So we need check destination buffer length when copying

[PATCH v3] kernel: kallsyms: memory override issue, need check destination buffer length

2013-04-14 Thread Chen Gang
whether valid, since it is a static function. Signed-off-by: Chen Gang gang.c...@asianux.com --- kernel/kallsyms.c | 26 ++ 1 files changed, 18 insertions(+), 8 deletions(-) diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c index 2169fee..3127ad5 100644 --- a/kernel

Re: [PATCH v3] kernel: kallsyms: memory override issue, need check destination buffer length

2013-04-15 Thread Chen Gang
On 2013年04月15日 13:48, Rusty Russell wrote: Chen Gang gang.c...@asianux.com writes: We don't export any symbols 128 characters, but if we did then kallsyms_expand_symbol() would overflow the buffer handed to it. So we need check destination buffer length when copying

Re: [PATCH] kernel: audit_tree: resource management: need put_tree and goto Err when failure occures

2013-04-16 Thread Chen Gang
oh, sorry, this patch need improving (got -- goto) and I should compile, install, running in normal condition, and be sure of no additional issues occur at least. On 2013年04月12日 12:43, Chen Gang wrote: since normally audit_add_tree_rule() will free it on failure, need free

Re: [PATCH] kernel: auditfilter: looping issue, memory leak if has 2 or more AUDIT_FILTERKEYs

2013-04-16 Thread Chen Gang
On 2013年04月12日 17:42, Chen Gang wrote: On 2013年04月11日 12:10, Chen Gang wrote: On 2013年04月11日 05:19, Eric Paris wrote: - Original Message - b. has an new issue for AUDIT_DIR: after AUDIT_DIR succeed, it will set rule-tree. next, the other case fail, then will call

Re: [PATCH] kernel: auditfilter: looping issue, memory leak if has 2 or more AUDIT_FILTERKEYs

2013-04-16 Thread Chen Gang
On 2013年04月16日 18:25, Chen Gang wrote: On 2013年04月12日 17:42, Chen Gang wrote: On 2013年04月11日 12:10, Chen Gang wrote: On 2013年04月11日 05:19, Eric Paris wrote: - Original Message - b. has an new issue for AUDIT_DIR: after AUDIT_DIR succeed, it will set rule-tree. next

Re: [PATCH] kernel: auditfilter: looping issue, memory leak if has 2 or more AUDIT_FILTERKEYs

2013-04-16 Thread Chen Gang
On 2013年04月16日 18:38, Chen Gang wrote: On 2013年04月16日 18:25, Chen Gang wrote: On 2013年04月12日 17:42, Chen Gang wrote: On 2013年04月11日 12:10, Chen Gang wrote: On 2013年04月11日 05:19, Eric Paris wrote: - Original Message - b. has an new issue for AUDIT_DIR: after AUDIT_DIR

[PATCH v2] kernel: audit_tree: resource management: need put_tree and goto Err when failure occures

2013-04-16 Thread Chen Gang
since normally audit_add_tree_rule() will free it on failure, need free it completely, when failure occures. need additional put_tree before return, since get_tree was called. always need goto error processing area for list_del_init. Signed-off-by: Chen Gang gang.c...@asianux.com

[PATCH v2] kernel: auditfilter: resource management, tree and watch will memory leak when failure occurs

2013-04-16 Thread Chen Gang
}' result: for original version: will use up all memory, within 3 hours. kill all auditctl, the memory still does not free. for new version (apply this patch): after 14 hours later, not find issues. Signed-off-by: Chen Gang gang.c...@asianux.com --- kernel

Re: [PATCH] kernel: auditfilter: resource management, need process tree when audit_add_watch failed in audit_add_rule

2013-04-16 Thread Chen Gang
also please help checking this patch, when you have time. thanks. On 2013年04月12日 16:56, Chen Gang wrote: need call audit_put_tree, if tree is valid. just like another area have done in function audit_add_rule. Signed-off-by: Chen Gang gang.c...@asianux.com --- kernel

Re: [Suggestion] ARM64:kernel: compiling issue for early_console.

2013-04-17 Thread Chen Gang
On 2013年04月03日 21:00, Chen Gang wrote: On 2013年04月03日 19:39, Christopher Covington wrote: Maybe somebody else does have a fix, but Catalin mentioned he was going on vacation for two weeks on March 28th in [GIT PULL] Preparatory GIC patches for arm64 support. ok, I can wait. could you

Re: [PATCH] kernel: debug: memcpy overlaped, use memmove instead of memcpy.

2013-04-17 Thread Chen Gang
Hello maintainers: please help check this patch, when you have time, thanks. On 2013年04月07日 18:24, Chen Gang wrote: in memcpy, src and dest are overlaped. for default implementaion or some architectures, it is OK. but we can not be sure that it is OK for all platforms

Re: [PATCH] kernel: debug: kdb: strncpy issue, using strlcpy instead of strncpy.

2013-04-17 Thread Chen Gang
Hello maintainers: please help check this patch, when you have time, thanks. On 2013年04月07日 19:03, Chen Gang wrote: cmd_cur and cmd_hist[] are all NUL terminated string. need using strlcpy instead of strncpy. Signed-off-by: Chen Gang gang.c...@asianux.com --- kernel/debug/kdb

Re: [PATCH] kernel: debug: kdb: strncpy issue, using strlcpy instead of strncpy

2013-04-17 Thread Chen Gang
Hello maintainers: please help check this patch, when you have time, thanks. On 2013年04月07日 19:20, Chen Gang wrote: kdb_prompt_str is NUL terminated string, need always set '\0' at the end. Signed-off-by: Chen Gang gang.c...@asianux.com --- kernel/debug/kdb/kdb_io.c |2 +- 1

[Suggestion] PowerPC: kernel: memory access violation when rtas_data_buf contents are more than 1026

2013-04-17 Thread Chen Gang
Hello Maintainers: in arch/powerpc/kernel/lparcfg.c, parse_system_parameter_string() need set '\0' for 'local_buffer'. the reason is: SPLPAR_MAXLENGTH is 1026, RTAS_DATA_BUF_SIZE is 4096 the contents of rtas_data_buf may truncated in memcpy (line 301). if contents are

[PATCH] kernel/audit_tree.c: tree will memory leak when failure occurs for audit_trim_trees()

2013-04-19 Thread Chen Gang
in audit_trim_trees(), has called get_tree() before failure occurs, so need also call put_tree after go to skip_it: Signed-off-by: Chen Gang gang.c...@asianux.com --- kernel/audit_tree.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/kernel/audit_tree.c b/kernel

[PATCH] ARM64: kernel: compiling issue, duplicate definition of early_console

2013-04-19 Thread Chen Gang
when compiling with allmodconfig. early_console is already defined as an extern global pointer. need let it point to the object which we intend to (like ARM32 done). Signed-off-by: Chen Gang gang.c...@asianux.com --- arch/arm64/kernel/early_printk.c |5 +++-- 1 files changed, 3

[PATCH] ARM64: kernel: compiling issue: need define readq and writeq for driver module using.

2013-04-19 Thread Chen Gang
. Signed-off-by: Chen Gang gang.c...@asianux.com --- arch/arm64/include/asm/io.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h index 57f12c9..2e12258 100644 --- a/arch/arm64/include/asm/io.h +++ b/arch/arm64

[Suggestion] ARM64: kernel: compiling issue, need implement cmpxchg64 with assembler language.

2013-04-19 Thread Chen Gang
in arch/arm64/include/asm, not define the function cmpxchg64 when compiling with allmodconfig, drivers/block/blockconsole.c will need this function. I am not quite familiar with ARM64 (neither ARM64 assembler) can any member helps to send related patch ? if no one have time to

Re: [PATCH] ARM64: kernel: compiling issue: need define readq and writeq for driver module using.

2013-04-19 Thread Chen Gang
On 2013年04月19日 20:35, Catalin Marinas wrote: On Fri, Apr 19, 2013 at 12:24:37PM +0100, Chen Gang wrote: when compiling with allmodconfig, CONFIG_64BIT=y the file drivers/base/regmap/regmap-mmio.c will use readq and writeq. so we need implement these functions. BTW

Re: [PATCH] ARM64: kernel: compiling issue, duplicate definition of early_console

2013-04-19 Thread Chen Gang
On 2013年04月19日 20:31, Catalin Marinas wrote: On Fri, Apr 19, 2013 at 11:53:07AM +0100, Chen Gang wrote: when compiling with allmodconfig. early_console is already defined as an extern global pointer. need let it point to the object which we intend to (like ARM32 done). Signed-off

Re: [PATCH] ARM64: kernel: compiling issue, duplicate definition of early_console

2013-04-19 Thread Chen Gang
On 2013年04月19日 20:15, Arnd Bergmann wrote: On Friday 19 April 2013, Chen Gang wrote: when compiling with allmodconfig. early_console is already defined as an extern global pointer. need let it point to the object which we intend to (like ARM32 done). Signed-off-by: Chen

Re: [Suggestion] ARM64: kernel: compiling issue, need implement cmpxchg64 with assembler language.

2013-04-19 Thread Chen Gang
On 2013年04月19日 20:12, Arnd Bergmann wrote: On Friday 19 April 2013, Chen Gang wrote: in arch/arm64/include/asm, not define the function cmpxchg64 when compiling with allmodconfig, drivers/block/blockconsole.c will need this function. I am not quite familiar with ARM64 (neither ARM64

Re: [PATCH v2] kernel: audit_tree: resource management: need put_tree and goto Err when failure occures

2013-04-20 Thread Chen Gang
On 2013年04月18日 09:19, Chen Gang F T wrote: On 2013年04月18日 04:07, Andrew Morton wrote: On Wed, 17 Apr 2013 12:04:02 +0800 Chen Gang gang.c...@asianux.com wrote: since normally audit_add_tree_rule() will free it on failure, need free it completely, when failure occures

Re: [Suggestion] ARM64: kernel: compiling issue, need implement cmpxchg64 with assembler language.

2013-04-21 Thread Chen Gang
On 2013年04月20日 15:32, Arnd Bergmann wrote: On Saturday 20 April 2013 10:28:55 Chen Gang wrote: ---patch begin-- diff --git a/arch/arm64/include/asm/cmpxchg.h b/arch/arm64/include/asm/cmpxchg.h index 968b5cb..b572d2b 100644

[PATCH] ARM64: kernel: compiling issue, define cmpxchg64 and cmpxchg64_local for outside using.

2013-04-21 Thread Chen Gang
drivers use cmpxchg64, cmpxchg64_local ... to perform 64-bit operation, so they can cross 32-bit and 64-bit platforms (it is a standard way). Signed-off-by: Chen Gang gang.c...@asianux.com --- arch/arm64/include/asm/cmpxchg.h |3 +++ 1 files changed, 3 insertions(+), 0 deletions

Re: [PATCH] Staging: Android: looping issue, need break when get value firstly.

2013-04-05 Thread Chen Gang
On 2013年04月06日 07:48, Arve Hjønnevåg wrote: On Fri, Apr 5, 2013 at 3:01 PM, Greg KH gre...@linuxfoundation.org wrote: On Fri, Apr 05, 2013 at 04:05:25PM +0800, Chen Gang wrote: need break when 'target_thread' get value, firstly. 'tmp' is a stack (thread-transaction_stack

Re: [PATCH] Staging: Android: looping issue, need break when get value firstly.

2013-04-05 Thread Chen Gang
On 2013年04月06日 06:01, Greg KH wrote: On Fri, Apr 05, 2013 at 04:05:25PM +0800, Chen Gang wrote: need break when 'target_thread' get value, firstly. 'tmp' is a stack (thread-transaction_stack), if 'proc' was the same between child node and parent node, the child would have

Re: [PATCH] Staging: Android: looping issue, need break when get value firstly.

2013-04-05 Thread Chen Gang
On 2013年04月06日 13:05, Chen Gang wrote: On 2013年04月06日 07:48, Arve Hjønnevåg wrote: Theoretically this should not change the behavior. The purpose of this code it to make sure only thread per process is part of a transaction stack, so if it finds more than one transaction with a matching

Re: [PATCH] Staging: Android: looping issue, need break when get value firstly.

2013-04-06 Thread Chen Gang
On 2013年04月06日 13:57, Greg KH wrote: On Sat, Apr 06, 2013 at 01:05:59PM +0800, Chen Gang wrote: On 2013年04月06日 07:48, Arve Hjønnevåg wrote: On Fri, Apr 5, 2013 at 3:01 PM, Greg KH gre...@linuxfoundation.org wrote: On Fri, Apr 05, 2013 at 04:05:25PM +0800, Chen Gang wrote

Re: [PATCH] Staging: Android: looping issue, need break when get value firstly.

2013-04-06 Thread Chen Gang
increasing a little performance). it is not quite suitable to spend much time to test a minor patch !! so whether what will happen, my patch seems obsoleted !! :-( -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body

Re: [PATCH] drivers/gpu/drm/nouveau: remove erroneous semicolon

2013-04-06 Thread Chen Gang
Hello Greg KH: when you have time, can you help to check this patch whether OK ? thanks. gchen. On 2013年04月03日 16:01, Chen Gang wrote: Hello maintainers: when you have time, please help to check this patch whether is OK. thanks. gchen. On 2013年03月27日 15:23, Chen Gang

[PATCH] Drivers: Base: Regmap: fix warnings, use %lu instead of %d for printf format

2013-04-06 Thread Chen Gang
fix warnings (with EXTRA_CFLAGS=-W): format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ [-Wformat] Signed-off-by: Chen Gang gang.c...@asianux.com --- drivers/base/regmap/regcache.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[PATCH] Drivers: Misc: fix warnings, unsigned long will never 0

2013-04-06 Thread Chen Gang
val is unsigned long which never 0 Signed-off-by: Chen Gang gang.c...@asianux.com --- drivers/misc/tsl2550.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/misc/tsl2550.c b/drivers/misc/tsl2550.c index 1e7bc0e..558dd20 100644 --- a/drivers/misc/tsl2550.c

Re: [PATCH] drivers/scsi/cxgbi: using ccflags-y instead of EXTRA_CFLAGS in Kbuild

2013-04-06 Thread Chen Gang
Hello Maintainers: please help check it when you have time. thanks. gchen. On 2013年02月28日 14:34, Chen Gang wrote: need using ccflags-y instead of EXTRA_CFLAGS can reference scripts/checkpatch.pl (1755..1766) when make EXTRA_CFLAGS=-W, the compiling issue will be occured

Re: [PATCH] Drivers: Misc: fix warnings, unsigned long will never 0

2013-04-06 Thread Chen Gang
also has another 'unsigned long val' warnings, I will send patch v2 to merge them together. On 2013年04月07日 11:09, Chen Gang wrote: val is unsigned long which never 0 Signed-off-by: Chen Gang gang.c...@asianux.com --- drivers/misc/tsl2550.c |2 +- 1 files changed, 1 insertions

[PATCH v2] Drivers: Misc: fix warnings, unsigned long will never 0

2013-04-06 Thread Chen Gang
val is unsigned long which never 0 Signed-off-by: Chen Gang gang.c...@asianux.com --- drivers/misc/tsl2550.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/misc/tsl2550.c b/drivers/misc/tsl2550.c index 1e7bc0e..5bf9448 100644 --- a/drivers/misc/tsl2550.c

Re: [PATCH] drivers/gpu/drm/nouveau: remove erroneous semicolon

2013-04-06 Thread Chen Gang
On 2013年04月07日 11:49, Greg KH wrote: On Sun, Apr 07, 2013 at 09:03:55AM +0800, Chen Gang wrote: Hello Greg KH: when you have time, can you help to check this patch whether OK ? No. Why ? does it also need a test ?? -- Chen Gang Asianux Corporation -- To unsubscribe from

Re: [PATCH] drivers/gpu/drm/nouveau: remove erroneous semicolon

2013-04-06 Thread Chen Gang
thank you very much for your reply, firstly. On 2013年04月07日 12:09, Joe Perches wrote: On Sun, 2013-04-07 at 11:57 +0800, Chen Gang wrote: On 2013年04月07日 11:49, Greg KH wrote: On Sun, Apr 07, 2013 at 09:03:55AM +0800, Chen Gang wrote: Hello Greg KH: when you have time, can you

[PATCH] kernel: audit: beautify code, for extern function, better to check its parameters by itself

2013-04-07 Thread Chen Gang
__audit_socketcall is an extern function. better to check its parameters by itself. also can return error code, when fail (find invalid parameters). also use macro instead of real hard code number also give related comments for it. Signed-off-by: Chen Gang gang.c...@asianux.com

Re: [PATCH] Drivers: Base: Regmap: fix warnings, use %lu instead of %d for printf format

2013-04-07 Thread Chen Gang
On 2013年04月07日 17:08, Bjørn Mork wrote: Chen Gang gang.c...@asianux.com writes: fix warnings (with EXTRA_CFLAGS=-W): format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ [-Wformat] Signed-off-by: Chen Gang gang.c...@asianux.com --- drivers/base

[PATCH v2] Drivers: Base: Regmap: fix warnings, use %zu instead of %d for printf format

2013-04-07 Thread Chen Gang
fix warnings (with EXTRA_CFLAGS=-W): format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ [-Wformat] Signed-off-by: Chen Gang gang.c...@asianux.com --- drivers/base/regmap/regcache.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[PATCH] kernel: debug: memcpy overlaped, use memmove instead of memcpy.

2013-04-07 Thread Chen Gang
. Signed-off-by: Chen Gang gang.c...@asianux.com --- kernel/debug/kdb/kdb_support.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/debug/kdb/kdb_support.c b/kernel/debug/kdb/kdb_support.c index d35cc2d..990b3cc 100644 --- a/kernel/debug/kdb/kdb_support.c +++ b

[PATCH] kernel: debug: kdb: strncpy issue, using strlcpy instead of strncpy.

2013-04-07 Thread Chen Gang
cmd_cur and cmd_hist[] are all NUL terminated string. need using strlcpy instead of strncpy. Signed-off-by: Chen Gang gang.c...@asianux.com --- kernel/debug/kdb/kdb_main.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/debug/kdb/kdb_main.c b/kernel

[PATCH] kernel: debug: kdb: strncpy issue, using strlcpy instead of strncpy

2013-04-07 Thread Chen Gang
kdb_prompt_str is NUL terminated string, need always set '\0' at the end. Signed-off-by: Chen Gang gang.c...@asianux.com --- kernel/debug/kdb/kdb_io.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/kernel/debug/kdb/kdb_io.c b/kernel/debug/kdb/kdb_io.c index 14ff484

Re: [PATCH] drivers/gpu/drm/nouveau: remove erroneous semicolon

2013-04-07 Thread Chen Gang
with EXTRA_CFLAGS=-W thanks. :-) -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http

Re: [PATCH v2] Drivers: Base: Regmap: fix warnings, use %zu instead of %d for printf format

2013-04-07 Thread Chen Gang
On 2013年04月07日 19:33, Mark Brown wrote: On Sun, Apr 07, 2013 at 05:32:39PM +0800, Chen Gang wrote: fix warnings (with EXTRA_CFLAGS=-W): format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ [-Wformat] Signed-off-by: Chen Gang gang.c...@asianux.com

[PATCH] kernel: module: strncpy issue, using strlcpy instead of strncpy

2013-04-07 Thread Chen Gang
ownername and namebuf are all NUL terminated string. need always let them ended by '\0'. Signed-off-by: Chen Gang gang.c...@asianux.com --- kernel/module.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/module.c b/kernel/module.c index 3c2c72d..597efd8

Re: [PATCH] kernel: module: strncpy issue, using strlcpy instead of strncpy

2013-04-07 Thread Chen Gang
On 2013年04月07日 22:28, Geert Uytterhoeven wrote: On Sun, Apr 7, 2013 at 1:38 PM, Chen Gang gang.c...@asianux.com wrote: ownername and namebuf are all NUL terminated string. need always let them ended by '\0'. Signed-off-by: Chen Gang gang.c...@asianux.com --- kernel/module.c

Re: [PATCH] kernel: module: strncpy issue, using strlcpy instead of strncpy

2013-04-07 Thread Chen Gang
On 2013年04月08日 10:48, Chen Gang wrote: On 2013年04月07日 22:28, Geert Uytterhoeven wrote: On Sun, Apr 7, 2013 at 1:38 PM, Chen Gang gang.c...@asianux.com wrote: ownername and namebuf are all NUL terminated string. need always let them ended by '\0'. Signed-off-by: Chen Gang gang.c

[PATCH] kernel: tsacct: strncpy, always be sure of NUL terminated.

2013-04-07 Thread Chen Gang
for NUL terminated string, always set '\0' at the end. Signed-off-by: Chen Gang gang.c...@asianux.com --- kernel/tsacct.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/kernel/tsacct.c b/kernel/tsacct.c index a1dd9a1..01bcc4e 100644 --- a/kernel/tsacct.c +++ b

[PATCH] kernel: events: strncpy, always be sure of NUL terminated.

2013-04-07 Thread Chen Gang
for NUL terminated string, always be sure of '\0' at the end. in our case, need return value, so still use strncpy (strlcpy return the size, not the pointer) Signed-off-by: Chen Gang gang.c...@asianux.com --- kernel/events/core.c |3 ++- 1 files changed, 2 insertions(+), 1

Re: [PATCH] kernel: tsacct: strncpy, always be sure of NUL terminated.

2013-04-07 Thread Chen Gang
On 2013年04月08日 11:52, KOSAKI Motohiro wrote: On Sun, Apr 7, 2013 at 11:27 PM, Chen Gang gang.c...@asianux.com wrote: for NUL terminated string, always set '\0' at the end. Signed-off-by: Chen Gang gang.c...@asianux.com --- kernel/tsacct.c |3 ++- 1 files changed, 2 insertions

[PATCH] kernel: trace: strncpy, using strlcpy instead of strncpy

2013-04-07 Thread Chen Gang
for NUL terminated string, need always set '\0' at the end. Signed-off-by: Chen Gang gang.c...@asianux.com --- kernel/trace/trace.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 829b2be..07860b9 100644

[PATCH] kernel: trace: ftrace: strncpy, using strlcpy instead of strncpy

2013-04-07 Thread Chen Gang
for NUL terminated string, need always set '\0' at the end. Signed-off-by: Chen Gang gang.c...@asianux.com --- kernel/trace/ftrace.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index dfd33f0..fa984b7 100644

Re: [PATCH] kernel: module: strncpy issue, using strlcpy instead of strncpy

2013-04-08 Thread Chen Gang
On 2013年04月08日 13:30, Rusty Russell wrote: Chen Gang gang.c...@asianux.com writes: ownername and namebuf are all NUL terminated string. need always let them ended by '\0'. Signed-off-by: Chen Gang gang.c...@asianux.com --- kernel/module.c |4 ++-- 1 files changed, 2

Re: [PATCH] drivers/block/drbd: remove erroneous semicolon

2013-04-08 Thread Chen Gang
On 2013年04月09日 04:45, Lars Ellenberg wrote: On Wed, Apr 03, 2013 at 04:00:31PM +0800, Chen Gang wrote: Hello maintainers: when you have time, please help to check this patch whether is OK. thanks. Thanks. It has already been queued in: http://git.kernel.dk/?p=linux-block.git

Re: [tip:perf/urgent] ftrace: Fix strncpy() use, use strlcpy() instead of strncpy()

2013-04-08 Thread Chen Gang
On 2013年04月08日 23:31, tip-bot for Chen Gang wrote: Commit-ID: 75761cc15877c155b3849b4e0e0cb3f897faf471 Gitweb: http://git.kernel.org/tip/75761cc15877c155b3849b4e0e0cb3f897faf471 Author: Chen Gang gang.c...@asianux.com AuthorDate: Mon, 8 Apr 2013 12:12:39 +0800 Committer: Ingo Molnar

Re: [PATCH] kernel: module: strncpy issue, using strlcpy instead of strncpy

2013-04-08 Thread Chen Gang
for it. since you find it, firstly, and also give a confirmation. can I add you as Signed-of-by, too ? and excuse me: I think I should spend time resources to have a test for new patch. so I will finish it within this weekend (2013-4-14), is it OK ? thanks. -- Chen Gang Asianux

[PATCH v2] kernel: module: using strlcpy and strcpy instead of strncpy

2013-04-08 Thread Chen Gang
namebuf is NUL terminated string. better always let it ended by '\0'. ownername and module_name(owner) are the same buf len. strcpy is better. Signed-off-by: Chen Gang gang.c...@asianux.com --- kernel/module.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH] kernel: kallsyms: parameters checking, for EXPORT_SYMBOL_GPL functions

2013-04-09 Thread Chen Gang
for EXPORT_SYMBOL_GPL functions, necessary to check their parameters. Signed-off-by: Chen Gang gang.c...@asianux.com --- kernel/kallsyms.c | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c index 2169fee..4ba57a9 100644

Re: [PATCH] kernel: module: strncpy issue, using strlcpy instead of strncpy

2013-04-09 Thread Chen Gang
On 2013年04月09日 09:52, Chen Gang wrote: it looks like a bug. for me, I prefer to give length check for it. but I am sorry, now, I can not be sure whether it is really a bug. It really is. We don't export any symbols 128 characters, but if we did then kallsyms_expand_symbol() would

Re: [PATCH] kernel: module: strncpy issue, using strlcpy instead of strncpy

2013-04-09 Thread Chen Gang
On 2013年04月09日 17:36, Chen Gang wrote: diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index 487ac6f..9ec6d1f 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c @@ -145,13 +145,15 @@ static int read_symbol(FILE *in, struct sym_entry *s) /* include the type field

Re: [Drbd-dev] [PATCH] drivers/block/drbd: remove erroneous semicolon

2013-04-09 Thread Chen Gang
On 2013年04月09日 23:56, Lars Ellenberg wrote: The original report (by kbuild test robot) is from the week before iirc (don't have it anymore), the original commit in our drbd repo the day before. really it is !! thanks. :-) -- Chen Gang Asianux Corporation -- To unsubscribe from

[PATCH v3] kernel: module: using strlcpy and strcpy instead of strncpy

2013-04-09 Thread Chen Gang
namebuf is NUL terminated string. better always let it ended by '\0'. the module_name() is always the name field of struct module (which is a fixed array), or a literal kernel, so strcpy is better. Signed-off-by: Chen Gang gang.c...@asianux.com --- kernel/module.c |4 ++-- 1 files

Re: [PATCH] kernel: module: strncpy issue, using strlcpy instead of strncpy

2013-04-10 Thread Chen Gang
On 2013年04月09日 17:36, Chen Gang wrote: On 2013年04月09日 09:52, Chen Gang wrote: it looks like a bug. for me, I prefer to give length check for it. but I am sorry, now, I can not be sure whether it is really a bug. It really is. We don't export any symbols 128 characters, but if we did

[PATCH] kernel: acct: kfree, also set related variable to NULL after kfree

2013-04-10 Thread Chen Gang
after kfree acct, also set ns-bacct to NULL. Signed-off-by: Chen Gang gang.c...@asianux.com --- kernel/acct.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/kernel/acct.c b/kernel/acct.c index 85389fe..91a23eb 100644 --- a/kernel/acct.c +++ b/kernel/acct.c @@ -332,6

[PATCH] kernel: auditfilter: looping issue, memory leak if has 2 or more AUDIT_FILTERKEYs

2013-04-10 Thread Chen Gang
in the 'fcount' looping, if 'new-fields[*].type has 2 or more AUDIT_FILTERKEYs need judge new-filterkey whether has value, or memory leak. Signed-off-by: Chen Gang gang.c...@asianux.com --- kernel/auditfilter.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git

Re: [PATCH] kernel: auditfilter: looping issue, memory leak if has 2 or more AUDIT_FILTERKEYs

2013-04-10 Thread Chen Gang
-tree. I find them only by reading code, not test them. and I also do not know about the related features. so please help check my 2 opinions whether are correct. welcome any suggestion or completions. thanks. :-) gchen. On 2013年04月10日 17:52, Chen Gang wrote: in the 'fcount

Re: [PATCH] kernel: auditfilter: looping issue, memory leak if has 2 or more AUDIT_FILTERKEYs

2013-04-10 Thread Chen Gang
also for function audit_list: when call audit_make_reply fails (will return NULL). we need free all its related variables instead of only kfree rull. (such as call autit_free_rule) please help check, thanks. :-) gchen. On 2013年04月10日 18:18, Chen Gang wrote: in another

Re: [PATCH] kernel: auditfilter: looping issue, memory leak if has 2 or more AUDIT_FILTERKEYs

2013-04-10 Thread Chen Gang
also for function audit_list_rules: when call audit_make_reply fails (will return NULL). we also need process data-buf, not only data itself. please help check, thanks. :-) gchen. On 2013年04月10日 18:28, Chen Gang wrote: also for function audit_list: when call

Re: [PATCH] kernel: kallsyms: parameters checking, for EXPORT_SYMBOL_GPL functions

2013-04-10 Thread Chen Gang
On 2013年04月10日 14:57, Rusty Russell wrote: Chen Gang gang.c...@asianux.com writes: for EXPORT_SYMBOL_GPL functions, necessary to check their parameters. Signed-off-by: Chen Gang gang.c...@asianux.com Why? If someone misuses these functions, they crash and thus indicate

Re: [PATCH] kernel: audit: beautify code, for extern function, better to check its parameters by itself

2013-04-10 Thread Chen Gang
also give related comments for it. Signed-off-by: Chen Gang gang.c...@asianux.com --- include/linux/audit.h | 12 kernel/auditsc.c |9 ++--- net/socket.c |6 -- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/include

Re: [PATCH] kernel: auditfilter: looping issue, memory leak if has 2 or more AUDIT_FILTERKEYs

2013-04-10 Thread Chen Gang
. We do not need to free it separately. This is a pretty common C trick. ok, thanks it is my fault. :-) -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info

[PATCH] kernel: kallsyms: memory override issue, need check destination buffer length

2013-04-10 Thread Chen Gang
whether valid, since it is a static function. Signed-off-by: Chen Gang gang.c...@asianux.com Signed-off-by: Rusty Russell ru...@rustcorp.com.au --- kernel/kallsyms.c | 26 +- 1 files changed, 17 insertions(+), 9 deletions(-) diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c

Re: [PATCH] kernel: auditfilter: looping issue, memory leak if has 2 or more AUDIT_FILTERKEYs

2013-04-10 Thread Chen Gang
which need to be freed... oh, it is my fault: (I did not notice: rule is struct audit_rule, not struct audit_krule). thanks. :-) -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord

Re: [PATCH] kernel: auditfilter: looping issue, memory leak if has 2 or more AUDIT_FILTERKEYs

2013-04-10 Thread Chen Gang
will set entry-rule-watch and the second will bomb with EINVAL in audit_to_watch() thanks, really it is. it is my fault. :-) -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More

Re: [PATCH] kernel: auditfilter: looping issue, memory leak if has 2 or more AUDIT_FILTERKEYs

2013-04-10 Thread Chen Gang
On 2013年04月11日 04:08, Eric Paris wrote: We only allow one filter key per rule. So we should never be able to get into this situation. See audit_data_to_entry() really it is, thanks. :-) -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line unsubscribe linux

Re: [PATCH] kernel: auditfilter: looping issue, memory leak if has 2 or more AUDIT_FILTERKEYs

2013-04-10 Thread Chen Gang
); if (erule-fields) for (i = 0; i erule-field_count; i++) { struct audit_field *f = erule-fields[i]; thanks. :-) -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord

Re: [PATCH] kernel: kallsyms: memory override issue, need check destination buffer length

2013-04-10 Thread Chen Gang
On 2013年04月11日 12:08, Rusty Russell wrote: Chen Gang gang.c...@asianux.com writes: We don't export any symbols 128 characters, but if we did then kallsyms_expand_symbol() would overflow the buffer handed to it. So we need check destination buffer length when copying. the related

Re: [PATCH] kernel: kallsyms: parameters checking, for EXPORT_SYMBOL_GPL functions

2013-04-10 Thread Chen Gang
), that is ok. it will let caller easier using it. also often give 0 size to snprintf, it still let caller easy using. if we treat EXPORT functions of kallsyms as commonly used (or we want to) I suggest to give parameter check for them. thanks. :-) -- Chen Gang Asianux Corporation

[PATCH v2] kernel: kallsyms: memory override issue, need check destination buffer length

2013-04-10 Thread Chen Gang
whether valid, since it is a static function. Signed-off-by: Chen Gang gang.c...@asianux.com --- kernel/kallsyms.c | 26 ++ 1 files changed, 18 insertions(+), 8 deletions(-) diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c index 2169fee..43d8150 100644 --- a/kernel

Re: [PATCH] kernel: auditfilter: looping issue, memory leak if has 2 or more AUDIT_FILTERKEYs

2013-04-11 Thread Chen Gang
of erule-watch and erule-tree are similar. please check, thanks. while(1) auditctl -a exit,always -w /etc -F auid=-1 it is valuable to me, thanks. -- Chen Gang Asianux Corporation -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body

Re: [PATCH] kernel: auditfilter: looping issue, memory leak if has 2 or more AUDIT_FILTERKEYs

2013-04-11 Thread Chen Gang
On 2013年04月11日 22:34, Chen Gang wrote: On 2013年04月11日 21:40, Eric Paris wrote: can we add it in audit_free_rule ? maybe like this: @@ -75,6 +75,8 @@ static inline void audit_free_rule(struct audit_entry *e) /* some rules don't have associated watches

Re: [PATCH 1/3] posix-timers: Correctly get dying task time sample in posix_cpu_timer_schedule()

2013-04-11 Thread Chen Gang
On 2013年04月11日 23:26, Frederic Weisbecker wrote: Bug reporters simply deserve to be credited, no sorting is required ;) thank God. next, I should continue to try to find another issues about kernel. I encourage you to do so :) I will continue. :-) -- Chen Gang Asianux

[PATCH] kernel: audit_tree: resource management: need put_tree and goto Err when failure occures

2013-04-11 Thread Chen Gang
since normally audit_add_tree_rule() will free it on failure, need free it completely, when failure occures. need additional put_tree before return, since get_tree was called. always need goto error processing area for list_del_init. Signed-off-by: Chen Gang gang.c...@asianux.com

[PATCH] kernel: audit_watch: resource management: better reset to NULL.

2013-04-11 Thread Chen Gang
better to set krule-watch = NULL. maybe it is not a real issue, but can make code clearer, so can help the readers to analyse another issues. Signed-off-by: Chen Gang gang.c...@asianux.com --- kernel/audit_watch.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git

Re: [PATCH] kernel: audit_watch: resource management: better reset to NULL.

2013-04-12 Thread Chen Gang
oh, sorry, this patch is incorrect, please skip it. On 2013年04月12日 12:50, Chen Gang wrote: better to set krule-watch = NULL. maybe it is not a real issue, but can make code clearer, so can help the readers to analyse another issues. Signed-off-by: Chen Gang gang.c...@asianux.com

  1   2   3   4   5   6   7   8   9   10   >