Commit 2c6b4b7
netconsole: avoid CON_ENABLED misuse to track registration
The CON_ENABLED flag is being misused to track whether or not the
extended console should be or has been registered. Instead use
a local variable to decide if the extended console should be
registered and console_is_registered() to determine if it has
been registered.
Also add a check in cleanup_netconsole() to only unregister the
extended console if it has been registered.
Signed-off-by: John Ogness <[email protected]>
Reviewed-by: Petr Mladek <[email protected]>
Signed-off-by: Petr Mladek <[email protected]>
Link: https://lore.kernel.org/r/[email protected]1 parent 9490b22 commit 2c6b4b7
1 file changed
+11
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
335 | | - | |
336 | | - | |
| 335 | + | |
337 | 336 | | |
338 | | - | |
339 | 337 | | |
340 | 338 | | |
341 | 339 | | |
| |||
869 | 867 | | |
870 | 868 | | |
871 | 869 | | |
872 | | - | |
| 870 | + | |
873 | 871 | | |
874 | 872 | | |
875 | 873 | | |
| |||
883 | 881 | | |
884 | 882 | | |
885 | 883 | | |
| 884 | + | |
886 | 885 | | |
887 | 886 | | |
888 | 887 | | |
| |||
895 | 894 | | |
896 | 895 | | |
897 | 896 | | |
898 | | - | |
899 | | - | |
900 | | - | |
901 | | - | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
902 | 901 | | |
| 902 | + | |
903 | 903 | | |
904 | 904 | | |
905 | 905 | | |
| |||
915 | 915 | | |
916 | 916 | | |
917 | 917 | | |
918 | | - | |
| 918 | + | |
919 | 919 | | |
920 | 920 | | |
921 | 921 | | |
| |||
945 | 945 | | |
946 | 946 | | |
947 | 947 | | |
948 | | - | |
| 948 | + | |
| 949 | + | |
949 | 950 | | |
950 | 951 | | |
951 | 952 | | |
| |||
0 commit comments