Skip to content

[SMAGENT-2066] Control driver printing when in interrupt context #1522

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 22, 2019

Conversation

nathan-b
Copy link
Contributor

A customer reported an issue where the driver would deadlock the system
by attempting to printk() while the schedule lock is already held due to
a context switch. This occurred because the context switch triggered a
deferred drop_x event, which prints a log message when it's processed.
Printing the log message caused the framebuffer helper in the console
print driver to attempt a context switch and hang the system on the
schedule lock.

This is a rare event, as it requires the kernel console log level to be
set to ERROR or above and for a print to occur while processing a
context switch tracepoint.

A customer reported an issue where the driver would deadlock the system
by attempting to printk() while the schedule lock is already held due to
a context switch. This occurred because the context switch triggered a
deferred drop_x event, which prints a log message when it's processed.
Printing the log message caused the framebuffer helper in the console
print driver to attempt a context switch and hang the system on the
schedule lock.

This is a rare event, as it requires the kernel console log level to be
set to ERROR or above and for a print to occur while processing a
context switch tracepoint.
Copy link

@bertocci bertocci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Copy link
Contributor

@gnosek gnosek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH I thought printk is safe to call from any possible context but looks like I was wrong ;)

LGTM

@nathan-b nathan-b merged commit 35b97c4 into dev Oct 22, 2019
@nathan-b nathan-b deleted the SMAGENT-2066 branch October 22, 2019 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants