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] [day] [month] [year] [list]
Message-ID: <4E7CE8E0.5070604@am.sony.com>
Date:	Fri, 23 Sep 2011 13:15:28 -0700
From:	Frank Rowand <frank.rowand@...sony.com>
To:	"Valdis.Kletnieks@...edu" <Valdis.Kletnieks@...edu>
CC:	"Rowand, Frank" <Frank_Rowand@...yusa.com>,
	"tglx@...utronix.de" <tglx@...utronix.de>,
	"linux-rt-users@...r.kernel.org" <linux-rt-users@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V2] preempt-rt: allow immediate Magic SysRq output for
 PREEMPT_RT_FULL

On 09/23/11 10:36, Valdis.Kletnieks@...edu wrote:
> On Thu, 22 Sep 2011 14:05:56 PDT, Frank Rowand said:
>> Change from V1 to V2:  add drivers/tty/serial/8250.c
> 
>>  drivers/tty/serial/cpm_uart/cpm_uart_core.c |    2 	1 +	1 -	0 !
>>  drivers/tty/serial/mfd.c                    |    2 	1 +	1 -	0 !
>>  drivers/tty/serial/nwpserial.c              |    2 	1 +	1 -	0 !
>>  drivers/tty/serial/omap-serial.c            |    2 	1 +	1 -	0 !
>>  drivers/tty/serial/sunhv.c                  |    4 	2 +	2 -	0 !
>>  drivers/tty/serial/sunsab.c                 |    2 	1 +	1 -	0 !
>>  drivers/tty/serial/sunsu.c                  |    2 	1 +	1 -	0 !
>>  drivers/tty/serial/sunzilog.c               |    2 	1 +	1 -	0 !
>>  drivers/tty/serial/uartlite.c               |    2 	1 +	1 -	0 !
>>  drivers/tty/serial/xilinx_uartps.c          |    2 	1 +	1 -	0 !
> 
>>  	if (up->port.sysrq)
>>  		locked = 0;
>> -	else if (oops_in_progress) {
>> +	else if (oops_in_progress || sysrq_in_progress) {
>>  		locked = spin_trylock(&up->port.lock);
>>  	} else
>>  		spin_lock(&up->port.lock);
> 
> Is it time to create a helper function for this chunk of code that appears
> in almost identical form in a dozen drivers?

Thanks for pointing that out.  The "if (up->port.sysrq)" in this pattern
already handles the case that I was trying to deal with in all of those
drivers, except cpm_uart_core.c, so I was able to remove all the other
drivers from V3 of the patch.

-Frank

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