mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
qcacld-3.0: Do not log current->comm from hw/sw irq context
Interrupt handlers do not have valid process context and hence current pointer is not valid for software/hardware interrupt handlers. In WLAN log to user space API current process name is logged using current->comm but hardware/software interrupts do not have corresponding current pointer because they use current pointer of interrupted process. Make changes to not to log process name when log message is generated from hardware/software interrupt handlers. Change-Id: I42420c501f9e7161112c5210909f83755ba4813e CRs-Fixed: 1065898
This commit is contained in:
parent
d198e81754
commit
0fad1762fe
1 changed files with 14 additions and 3 deletions
|
|
@ -258,14 +258,19 @@ static int wlan_queue_logmsg_for_app(void)
|
|||
*
|
||||
* For discrete solution e.g rome use system tick and convert it into
|
||||
* seconds.milli seconds
|
||||
*
|
||||
* Return: number of characters written in target buffer not including
|
||||
* trailing '/0'
|
||||
*/
|
||||
static int wlan_add_user_log_radio_time_stamp(char *tbuf, size_t tbuf_sz,
|
||||
uint64_t ts, int radio)
|
||||
{
|
||||
int tlen;
|
||||
|
||||
tlen = scnprintf(tbuf, tbuf_sz, "R%d: [%s][%llu] ",
|
||||
radio, current->comm, ts);
|
||||
tlen = scnprintf(tbuf, tbuf_sz, "R%d: [%s][%llu] ", radio,
|
||||
((in_irq() ? "irq" : in_softirq() ? "soft_irq" :
|
||||
current->comm)),
|
||||
ts);
|
||||
return tlen;
|
||||
}
|
||||
#else
|
||||
|
|
@ -281,6 +286,9 @@ static int wlan_add_user_log_radio_time_stamp(char *tbuf, size_t tbuf_sz,
|
|||
*
|
||||
* For discrete solution e.g rome use system tick and convert it into
|
||||
* seconds.milli seconds
|
||||
*
|
||||
* Return: number of characters written in target buffer not including
|
||||
* trailing '/0'
|
||||
*/
|
||||
static int wlan_add_user_log_radio_time_stamp(char *tbuf, size_t tbuf_sz,
|
||||
uint64_t ts, int radio)
|
||||
|
|
@ -290,7 +298,10 @@ static int wlan_add_user_log_radio_time_stamp(char *tbuf, size_t tbuf_sz,
|
|||
|
||||
rem = do_div(ts, QDF_MC_TIMER_TO_SEC_UNIT);
|
||||
tlen = scnprintf(tbuf, tbuf_sz, "R%d: [%s][%lu.%06lu] ", radio,
|
||||
current->comm, (unsigned long) ts, (unsigned long)rem);
|
||||
((in_irq() ? "irq" : in_softirq() ? "soft_irq" :
|
||||
current->comm)),
|
||||
(unsigned long) ts,
|
||||
(unsigned long)rem);
|
||||
return tlen;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue