lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51480E33.7030708@linux.vnet.ibm.com>
Date:	Tue, 19 Mar 2013 15:05:23 +0800
From:	Xiao Guangrong <xiaoguangrong@...ux.vnet.ibm.com>
To:	Xiao Guangrong <xiaoguangrong@...ux.vnet.ibm.com>
CC:	Dong Hao <haodong@...ux.vnet.ibm.com>, gregkh@...uxfoundation.org,
	shangw@...ux.vnet.ibm.com, weiyang@...ux.vnet.ibm.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] lib/kobject: WARN_ON corresponds to BUG_ON

On 03/19/2013 03:03 PM, Xiao Guangrong wrote:
> On 03/19/2013 02:47 PM, Dong Hao wrote:
>> From: Dong Hao <haodong@...ux.vnet.ibm.com>
>>
>> WARN_ON corresponds to BUG_ON and also gets more info.
> 
> Change the log like this:
> like the comments said, double initialize a kobj is wrong
> but can be recoverd, using WARN_ON to warn the developer also
> it can get more info.
> 
> (Or you refine the code by yourself.)

s/code/comment

> 
>>
>> Signed-off-by: Dong Hao <haodong@...ux.vnet.ibm.com>
>> ---
>>  lib/kobject.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/lib/kobject.c b/lib/kobject.c
>> index ff9b3c3..f7d9f31 100644
>> --- a/lib/kobject.c
>> +++ b/lib/kobject.c
>> @@ -281,7 +281,7 @@ void kobject_init(struct kobject *kobj, struct kobj_type *ktype)
>>  		/* do not error out as sometimes we can recover */
>>  		printk(KERN_ERR "kobject (%p): tried to init an initialized "
>>  		       "object, something is seriously wrong.\n", kobj);
>> -		dump_stack();
>> +		WARN_ON(1);
>>  	}
>>
>>  	kobject_init_internal(kobj);
>>
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ