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: <5449C9F6.5040903@huawei.com>
Date:	Fri, 24 Oct 2014 11:39:34 +0800
From:	hujianyang <hujianyang@...wei.com>
To:	Tanya Brokhman <tlinder@...eaurora.org>
CC:	<dedekind1@...il.com>, <ezequiel.garcia@...e-electrons.com>,
	"Richard Weinberger" <richard@....at>,
	open list <linux-kernel@...r.kernel.org>,
	<linux-mtd@...ts.infradead.org>, <linux-arm-msm@...r.kernel.org>,
	"Brian Norris" <computersforpeace@...il.com>,
	David Woodhouse <dwmw2@...radead.org>
Subject: Re: [PATCH V5] mtd: ubi: Extend UBI layer debug/messaging capabilities

On 2014/10/24 11:33, hujianyang wrote:
> 
>> @@ -1798,15 +1803,18 @@ int ubi_thread(void *u)
>>  	int failures = 0;
>>  	struct ubi_device *ubi = u;
>>
>> -	ubi_msg("background thread \"%s\" started, PID %d",
>> +	ubi_msg(ubi, "background thread \"%s\" started, PID %d",
>>  		ubi->bgt_name, task_pid_nr(current));
>>
>>  	set_freezable();
>>  	for (;;) {
>>  		int err;
>>
>> -		if (kthread_should_stop())
>> +		if (kthread_should_stop()) {
>> +			ubi_msg(ubi, "background thread \"%s\" should stop, PID %d",
>> +				ubi->bgt_name, task_pid_nr(current));
>>  			break;
>> +		}
>>
>>  		if (try_to_freeze())
>>  			continue;

> @@ -470,8 +470,11 @@ struct ubi_wl_entry *ubi_wl_get_fm_peb(struct ubi_device *ubi, int anchor)
>  {
>  	struct ubi_wl_entry *e = NULL;
>
> -	if (!ubi->free.rb_node || (ubi->free_count - ubi->beb_rsvd_pebs < 1))
> +	if (!ubi->free.rb_node || (ubi->free_count - ubi->beb_rsvd_pebs < 1)) {
> +		ubi_warn(ubi, "Can't get peb for fastmap:anchor=%d, free_cnt=%d, reserved=%d",
> +			 anchor, ubi->free_count, ubi->beb_rsvd_pebs);
>  		goto out;
> +	}
>
>  	if (anchor)
>  		e = find_anchor_wl_entry(&ubi->free);

Sorry, one of the adding messages should be this~!

> 
>> @@ -1798,15 +1803,18 @@ int ubi_thread(void *u)
>>  	int failures = 0;
>>  	struct ubi_device *ubi = u;
>>
>> -	ubi_msg("background thread \"%s\" started, PID %d",
>> +	ubi_msg(ubi, "background thread \"%s\" started, PID %d",
>>  		ubi->bgt_name, task_pid_nr(current));
>>
>>  	set_freezable();
>>  	for (;;) {
>>  		int err;
>>
>> -		if (kthread_should_stop())
>> +		if (kthread_should_stop()) {
>> +			ubi_msg(ubi, "background thread \"%s\" should stop, PID %d",
>> +				ubi->bgt_name, task_pid_nr(current));
>>  			break;
>> +		}
>>
>>  		if (try_to_freeze())
>>  			continue;
> 
> Here are two new adding messages. Maybe a separate patch is better? Just a
> suggestion.
> 



--
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