402 Star 1.4K Fork 1.3K

GVPopenEuler / kernel

 / 详情

【oE23.09】softdog加载后打开设备,旧版本可以直接卸载,新版本不可卸载

已验收
缺陷
创建于  
2023-09-11 16:04

【标题描述】【2309】NetworkManager,lo设备连接状态变更

一、缺陷信息

内核信息:
kernel-6.4.0-3.0.0.11.oe2309

缺陷简述
softdog加载后打开设备,旧版本可以直接卸载,新版本不可卸载

评论 (7)

luluyuan 创建了缺陷

Hi luluyalula, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: Kernel, and any of the maintainers.

openeuler-ci-bot 添加了
 
sig/Kernel
标签
luluyuan 里程碑设置为openEuler-23.09-round-3

watchdog_softdog_noboot_panic

luluyuan 负责人设置为Wei Li
Wei Li 修改了标题
Wei Li 修改了描述

测试步骤:
1:加载softdog,modprobe softdog soft_margin=30 soft_noboot=1 soft_panic=1
2:打开设备

#include <linux/watchdog.h>
#include <string.h>
#include <stdio.h>
#include <fcntl.h>

#define WDT_DEVICE_FILE "/dev/watchdog"

int main(void)
{
    int g_watchdog_fd = open(WDT_DEVICE_FILE, O_RDWR);
    if (g_watchdog_fd < 0) {
        printf("Error in file open WDT device file(%s)...\n", WDT_DEVICE_FILE);
        return 0;
    }
}

3:预期卸载成功,实际卸载设备报错: Modulesoftdog is in use

5.10内核,920物理机环境:

[root@openEuler tracing]# cat trace
# tracer: nop
#
# entries-in-buffer/entries-written: 0/0   #P:4
#
#                                _-----=> irqs-off/BH-disabled
#                               / _----=> need-resched
#                              | / _---=> hardirq/softirq
#                              || / _--=> preempt-depth
#                              ||| / _-=> migrate-disable
#                              |||| /     delay
#           TASK-PID     CPU#  |||||  TIMESTAMP  FUNCTION
#              | |         |   |||||     |         |
[root@openEuler tracing]# modprobe softdog soft_margin=30 soft_noboot=1 soft_panic=1
[root@openEuler tracing]# cat trace
# tracer: nop
#
# entries-in-buffer/entries-written: 3/3   #P:4
#
#                                _-----=> irqs-off/BH-disabled
#                               / _----=> need-resched
#                              | / _---=> hardirq/softirq
#                              || / _--=> preempt-depth
#                              ||| / _-=> migrate-disable
#                              |||| /     delay
#           TASK-PID     CPU#  |||||  TIMESTAMP  FUNCTION
#              | |         |   |||||     |         |
        modprobe-7275    [001] .....  5397.078772: module_get: sha2_ce call_site=__crypto_alg_lookup refcnt=2
        modprobe-7275    [001] .....  5397.078797: module_put: sha2_ce call_site=crypto_mod_put refcnt=1
        modprobe-7275    [001] .....  5397.081018: module_put: softdog call_site=do_init_module refcnt=1
[root@openEuler tracing]# rmmod softdog 
[root@openEuler tracing]# cat trace
# tracer: nop
#
# entries-in-buffer/entries-written: 3/3   #P:4
#
#                                _-----=> irqs-off/BH-disabled
#                               / _----=> need-resched
#                              | / _---=> hardirq/softirq
#                              || / _--=> preempt-depth
#                              ||| / _-=> migrate-disable
#                              |||| /     delay
#           TASK-PID     CPU#  |||||  TIMESTAMP  FUNCTION
#              | |         |   |||||     |         |
        modprobe-7275    [001] .....  5397.078772: module_get: sha2_ce call_site=__crypto_alg_lookup refcnt=2
        modprobe-7275    [001] .....  5397.078797: module_put: sha2_ce call_site=crypto_mod_put refcnt=1
        modprobe-7275    [001] .....  5397.081018: module_put: softdog call_site=do_init_module refcnt=1
[root@openEuler tracing]# 
[root@openEuler tracing]# 
[root@openEuler tracing]# modprobe softdog soft_margin=30 soft_noboot=1 soft_panic=1
[root@openEuler tracing]# cat /dev/watchdog
cat: /dev/watchdog: Invalid argument
[root@openEuler tracing]# cat trace
# tracer: nop
#
# entries-in-buffer/entries-written: 8/8   #P:4
#
#                                _-----=> irqs-off/BH-disabled
#                               / _----=> need-resched
#                              | / _---=> hardirq/softirq
#                              || / _--=> preempt-depth
#                              ||| / _-=> migrate-disable
#                              |||| /     delay
#           TASK-PID     CPU#  |||||  TIMESTAMP  FUNCTION
#              | |         |   |||||     |         |
        modprobe-7275    [001] .....  5397.078772: module_get: sha2_ce call_site=__crypto_alg_lookup refcnt=2
        modprobe-7275    [001] .....  5397.078797: module_put: sha2_ce call_site=crypto_mod_put refcnt=1
        modprobe-7275    [001] .....  5397.081018: module_put: softdog call_site=do_init_module refcnt=1
        modprobe-7295    [001] .....  5418.999244: module_get: sha2_ce call_site=__crypto_alg_lookup refcnt=2
        modprobe-7295    [001] .....  5418.999269: module_put: sha2_ce call_site=crypto_mod_put refcnt=1
        modprobe-7295    [001] .....  5419.001520: module_put: softdog call_site=do_init_module refcnt=1
             cat-7303    [003] .....  5425.340671: module_get: softdog call_site=watchdog_open refcnt=2
             cat-7303    [003] .....  5425.340673: module_get: softdog call_site=softdog_ping [softdog] refcnt=3
[root@openEuler tracing]# rmmod softdog 
rmmod: ERROR: Module softdog is in use
[root@openEuler tracing]# echo V > /dev/watchdog
[root@openEuler tracing]# cat trace
# tracer: nop
#
# entries-in-buffer/entries-written: 10/10   #P:4
#
#                                _-----=> irqs-off/BH-disabled
#                               / _----=> need-resched
#                              | / _---=> hardirq/softirq
#                              || / _--=> preempt-depth
#                              ||| / _-=> migrate-disable
#                              |||| /     delay
#           TASK-PID     CPU#  |||||  TIMESTAMP  FUNCTION
#              | |         |   |||||     |         |
        modprobe-7275    [001] .....  5397.078772: module_get: sha2_ce call_site=__crypto_alg_lookup refcnt=2
        modprobe-7275    [001] .....  5397.078797: module_put: sha2_ce call_site=crypto_mod_put refcnt=1
        modprobe-7275    [001] .....  5397.081018: module_put: softdog call_site=do_init_module refcnt=1
        modprobe-7295    [001] .....  5418.999244: module_get: sha2_ce call_site=__crypto_alg_lookup refcnt=2
        modprobe-7295    [001] .....  5418.999269: module_put: sha2_ce call_site=crypto_mod_put refcnt=1
        modprobe-7295    [001] .....  5419.001520: module_put: softdog call_site=do_init_module refcnt=1
             cat-7303    [003] .....  5425.340671: module_get: softdog call_site=watchdog_open refcnt=2
             cat-7303    [003] .....  5425.340673: module_get: softdog call_site=softdog_ping [softdog] refcnt=3
            bash-7106    [001] .....  5439.288824: module_put: softdog call_site=softdog_stop [softdog] refcnt=2
            bash-7106    [001] .....  5439.288826: module_put: softdog call_site=watchdog_release refcnt=1
[root@openEuler tracing]# rmmod softdog 
[root@openEuler tracing]# 
[root@openEuler tracing]# uname -a
Linux openEuler 6.4.0-8.0.0.17.oe2309.aarch64 #1 SMP Mon Sep 18 17:41:45 CST 2023 aarch64 aarch64 aarch64 GNU/Linux
[root@openEuler tracing]# 

6.4内核,920虚拟机环境:

[root@localhost tracing]# modprobe softdog soft_margin=30 soft_noboot=1 soft_panic=1
[root@localhost tracing]# cat trace
# tracer: nop
#
# entries-in-buffer/entries-written: 5/5   #P:128
#
#                                _-----=> irqs-off
#                               / _----=> need-resched
#                              | / _---=> hardirq/softirq
#                              || / _--=> preempt-depth
#                              ||| /     delay
#           TASK-PID     CPU#  ||||   TIMESTAMP  FUNCTION
#              | |         |   ||||      |         |
        modprobe-8139    [076] .... 26013.243861: module_get: sha2_ce call_site=crypto_mod_get refcnt=3
        modprobe-8139    [076] .... 26013.244084: module_put: sha2_ce call_site=crypto_mod_put refcnt=2
        modprobe-8139    [076] .... 26013.244094: module_get: hisi_hpre call_site=crypto_mod_get refcnt=2
        modprobe-8139    [076] .... 26013.245029: module_put: hisi_hpre call_site=crypto_mod_put refcnt=1
        modprobe-8139    [076] .N.. 26013.268177: module_put: softdog call_site=do_init_module refcnt=1
[root@localhost tracing]# lsmod | grep soft
softdog                20480  0
[root@localhost tracing]# cat trace
# tracer: nop
#
# entries-in-buffer/entries-written: 5/5   #P:128
#
#                                _-----=> irqs-off
#                               / _----=> need-resched
#                              | / _---=> hardirq/softirq
#                              || / _--=> preempt-depth
#                              ||| /     delay
#           TASK-PID     CPU#  ||||   TIMESTAMP  FUNCTION
#              | |         |   ||||      |         |
        modprobe-8139    [076] .... 26013.243861: module_get: sha2_ce call_site=crypto_mod_get refcnt=3
        modprobe-8139    [076] .... 26013.244084: module_put: sha2_ce call_site=crypto_mod_put refcnt=2
        modprobe-8139    [076] .... 26013.244094: module_get: hisi_hpre call_site=crypto_mod_get refcnt=2
        modprobe-8139    [076] .... 26013.245029: module_put: hisi_hpre call_site=crypto_mod_put refcnt=1
        modprobe-8139    [076] .N.. 26013.268177: module_put: softdog call_site=do_init_module refcnt=1
[root@localhost tracing]# 
[root@localhost tracing]# 
[root@localhost tracing]# rmmod 
rmmod: ERROR: missing module name.
[root@localhost tracing]# rmmod softdog
[root@localhost tracing]# cat trace
# tracer: nop
#
# entries-in-buffer/entries-written: 5/5   #P:128
#
#                                _-----=> irqs-off
#                               / _----=> need-resched
#                              | / _---=> hardirq/softirq
#                              || / _--=> preempt-depth
#                              ||| /     delay
#           TASK-PID     CPU#  ||||   TIMESTAMP  FUNCTION
#              | |         |   ||||      |         |
        modprobe-8139    [076] .... 26013.243861: module_get: sha2_ce call_site=crypto_mod_get refcnt=3
        modprobe-8139    [076] .... 26013.244084: module_put: sha2_ce call_site=crypto_mod_put refcnt=2
        modprobe-8139    [076] .... 26013.244094: module_get: hisi_hpre call_site=crypto_mod_get refcnt=2
        modprobe-8139    [076] .... 26013.245029: module_put: hisi_hpre call_site=crypto_mod_put refcnt=1
        modprobe-8139    [076] .N.. 26013.268177: module_put: softdog call_site=do_init_module refcnt=1
[root@localhost tracing]# 
[root@localhost tracing]# modprobe softdog soft_margin=30 soft_noboot=1 soft_panic=1
[root@localhost tracing]# 
[root@localhost tracing]# cat trace
# tracer: nop
#
# entries-in-buffer/entries-written: 10/10   #P:128
#
#                                _-----=> irqs-off
#                               / _----=> need-resched
#                              | / _---=> hardirq/softirq
#                              || / _--=> preempt-depth
#                              ||| /     delay
#           TASK-PID     CPU#  ||||   TIMESTAMP  FUNCTION
#              | |         |   ||||      |         |
        modprobe-8139    [076] .... 26013.243861: module_get: sha2_ce call_site=crypto_mod_get refcnt=3
        modprobe-8139    [076] .... 26013.244084: module_put: sha2_ce call_site=crypto_mod_put refcnt=2
        modprobe-8139    [076] .... 26013.244094: module_get: hisi_hpre call_site=crypto_mod_get refcnt=2
        modprobe-8139    [076] .... 26013.245029: module_put: hisi_hpre call_site=crypto_mod_put refcnt=1
        modprobe-8139    [076] .N.. 26013.268177: module_put: softdog call_site=do_init_module refcnt=1
        modprobe-8204    [076] .... 26319.039041: module_get: sha2_ce call_site=crypto_mod_get refcnt=3
        modprobe-8204    [076] .... 26319.039266: module_put: sha2_ce call_site=crypto_mod_put refcnt=2
        modprobe-8204    [076] .... 26319.039276: module_get: hisi_hpre call_site=crypto_mod_get refcnt=2
        modprobe-8204    [076] .... 26319.040220: module_put: hisi_hpre call_site=crypto_mod_put refcnt=1
        modprobe-8204    [076] .N.. 26319.063150: module_put: softdog call_site=do_init_module refcnt=1
[root@localhost tracing]# 
[root@localhost tracing]# 
[root@localhost tracing]# cat /dev/watchdog
cat: /dev/watchdog: Invalid argument
[root@localhost tracing]# cat trace
# tracer: nop
#
# entries-in-buffer/entries-written: 12/12   #P:128
#
#                                _-----=> irqs-off
#                               / _----=> need-resched
#                              | / _---=> hardirq/softirq
#                              || / _--=> preempt-depth
#                              ||| /     delay
#           TASK-PID     CPU#  ||||   TIMESTAMP  FUNCTION
#              | |         |   ||||      |         |
        modprobe-8139    [076] .... 26013.243861: module_get: sha2_ce call_site=crypto_mod_get refcnt=3
        modprobe-8139    [076] .... 26013.244084: module_put: sha2_ce call_site=crypto_mod_put refcnt=2
        modprobe-8139    [076] .... 26013.244094: module_get: hisi_hpre call_site=crypto_mod_get refcnt=2
        modprobe-8139    [076] .... 26013.245029: module_put: hisi_hpre call_site=crypto_mod_put refcnt=1
        modprobe-8139    [076] .N.. 26013.268177: module_put: softdog call_site=do_init_module refcnt=1
        modprobe-8204    [076] .... 26319.039041: module_get: sha2_ce call_site=crypto_mod_get refcnt=3
        modprobe-8204    [076] .... 26319.039266: module_put: sha2_ce call_site=crypto_mod_put refcnt=2
        modprobe-8204    [076] .... 26319.039276: module_get: hisi_hpre call_site=crypto_mod_get refcnt=2
        modprobe-8204    [076] .... 26319.040220: module_put: hisi_hpre call_site=crypto_mod_put refcnt=1
        modprobe-8204    [076] .N.. 26319.063150: module_put: softdog call_site=do_init_module refcnt=1
             cat-8208    [076] .... 26335.674296: module_get: sbsa_gwdt call_site=watchdog_open refcnt=2
             cat-8208    [076] .N.. 26335.680374: module_put: sbsa_gwdt call_site=watchdog_release refcnt=1
[root@localhost tracing]# rmmod softdog
[root@localhost tracing]# cat trace
# tracer: nop
#
# entries-in-buffer/entries-written: 12/12   #P:128
#
#                                _-----=> irqs-off
#                               / _----=> need-resched
#                              | / _---=> hardirq/softirq
#                              || / _--=> preempt-depth
#                              ||| /     delay
#           TASK-PID     CPU#  ||||   TIMESTAMP  FUNCTION
#              | |         |   ||||      |         |
        modprobe-8139    [076] .... 26013.243861: module_get: sha2_ce call_site=crypto_mod_get refcnt=3
        modprobe-8139    [076] .... 26013.244084: module_put: sha2_ce call_site=crypto_mod_put refcnt=2
        modprobe-8139    [076] .... 26013.244094: module_get: hisi_hpre call_site=crypto_mod_get refcnt=2
        modprobe-8139    [076] .... 26013.245029: module_put: hisi_hpre call_site=crypto_mod_put refcnt=1
        modprobe-8139    [076] .N.. 26013.268177: module_put: softdog call_site=do_init_module refcnt=1
        modprobe-8204    [076] .... 26319.039041: module_get: sha2_ce call_site=crypto_mod_get refcnt=3
        modprobe-8204    [076] .... 26319.039266: module_put: sha2_ce call_site=crypto_mod_put refcnt=2
        modprobe-8204    [076] .... 26319.039276: module_get: hisi_hpre call_site=crypto_mod_get refcnt=2
        modprobe-8204    [076] .... 26319.040220: module_put: hisi_hpre call_site=crypto_mod_put refcnt=1
        modprobe-8204    [076] .N.. 26319.063150: module_put: softdog call_site=do_init_module refcnt=1
             cat-8208    [076] .... 26335.674296: module_get: sbsa_gwdt call_site=watchdog_open refcnt=2
             cat-8208    [076] .N.. 26335.680374: module_put: sbsa_gwdt call_site=watchdog_release refcnt=1
[root@localhost tracing]# rmmod sbsa_gwdt
[root@localhost tracing]# cat trace
# tracer: nop
#
# entries-in-buffer/entries-written: 12/12   #P:128
#
#                                _-----=> irqs-off
#                               / _----=> need-resched
#                              | / _---=> hardirq/softirq
#                              || / _--=> preempt-depth
#                              ||| /     delay
#           TASK-PID     CPU#  ||||   TIMESTAMP  FUNCTION
#              | |         |   ||||      |         |
        modprobe-8139    [076] .... 26013.243861: module_get: sha2_ce call_site=crypto_mod_get refcnt=3
        modprobe-8139    [076] .... 26013.244084: module_put: sha2_ce call_site=crypto_mod_put refcnt=2
        modprobe-8139    [076] .... 26013.244094: module_get: hisi_hpre call_site=crypto_mod_get refcnt=2
        modprobe-8139    [076] .... 26013.245029: module_put: hisi_hpre call_site=crypto_mod_put refcnt=1
        modprobe-8139    [076] .N.. 26013.268177: module_put: softdog call_site=do_init_module refcnt=1
        modprobe-8204    [076] .... 26319.039041: module_get: sha2_ce call_site=crypto_mod_get refcnt=3
        modprobe-8204    [076] .... 26319.039266: module_put: sha2_ce call_site=crypto_mod_put refcnt=2
        modprobe-8204    [076] .... 26319.039276: module_get: hisi_hpre call_site=crypto_mod_get refcnt=2
        modprobe-8204    [076] .... 26319.040220: module_put: hisi_hpre call_site=crypto_mod_put refcnt=1
        modprobe-8204    [076] .N.. 26319.063150: module_put: softdog call_site=do_init_module refcnt=1
             cat-8208    [076] .... 26335.674296: module_get: sbsa_gwdt call_site=watchdog_open refcnt=2
             cat-8208    [076] .N.. 26335.680374: module_put: sbsa_gwdt call_site=watchdog_release refcnt=1
[root@localhost tracing]# 
[root@localhost tracing]# 
[root@localhost tracing]# 
[root@localhost tracing]# 
[root@localhost tracing]# modprobe softdog soft_margin=30 soft_noboot=1 soft_panic=1
[root@localhost tracing]# cat trace
# tracer: nop
#
# entries-in-buffer/entries-written: 17/17   #P:128
#
#                                _-----=> irqs-off
#                               / _----=> need-resched
#                              | / _---=> hardirq/softirq
#                              || / _--=> preempt-depth
#                              ||| /     delay
#           TASK-PID     CPU#  ||||   TIMESTAMP  FUNCTION
#              | |         |   ||||      |         |
        modprobe-8139    [076] .... 26013.243861: module_get: sha2_ce call_site=crypto_mod_get refcnt=3
        modprobe-8139    [076] .... 26013.244084: module_put: sha2_ce call_site=crypto_mod_put refcnt=2
        modprobe-8139    [076] .... 26013.244094: module_get: hisi_hpre call_site=crypto_mod_get refcnt=2
        modprobe-8139    [076] .... 26013.245029: module_put: hisi_hpre call_site=crypto_mod_put refcnt=1
        modprobe-8139    [076] .N.. 26013.268177: module_put: softdog call_site=do_init_module refcnt=1
        modprobe-8204    [076] .... 26319.039041: module_get: sha2_ce call_site=crypto_mod_get refcnt=3
        modprobe-8204    [076] .... 26319.039266: module_put: sha2_ce call_site=crypto_mod_put refcnt=2
        modprobe-8204    [076] .... 26319.039276: module_get: hisi_hpre call_site=crypto_mod_get refcnt=2
        modprobe-8204    [076] .... 26319.040220: module_put: hisi_hpre call_site=crypto_mod_put refcnt=1
        modprobe-8204    [076] .N.. 26319.063150: module_put: softdog call_site=do_init_module refcnt=1
             cat-8208    [076] .... 26335.674296: module_get: sbsa_gwdt call_site=watchdog_open refcnt=2
             cat-8208    [076] .N.. 26335.680374: module_put: sbsa_gwdt call_site=watchdog_release refcnt=1
        modprobe-8244    [076] .... 26466.132492: module_get: sha2_ce call_site=crypto_mod_get refcnt=3
        modprobe-8244    [076] .... 26466.132713: module_put: sha2_ce call_site=crypto_mod_put refcnt=2
        modprobe-8244    [076] .... 26466.132723: module_get: hisi_hpre call_site=crypto_mod_get refcnt=2
        modprobe-8244    [076] .... 26466.133661: module_put: hisi_hpre call_site=crypto_mod_put refcnt=1
        modprobe-8244    [076] .N.. 26466.156601: module_put: softdog call_site=do_init_module refcnt=1
[root@localhost tracing]# 
[root@localhost tracing]# cat /dev/watchdog
cat: /dev/watchdog: Invalid argument
[root@localhost tracing]# cat trace
# tracer: nop
#
# entries-in-buffer/entries-written: 20/20   #P:128
#
#                                _-----=> irqs-off
#                               / _----=> need-resched
#                              | / _---=> hardirq/softirq
#                              || / _--=> preempt-depth
#                              ||| /     delay
#           TASK-PID     CPU#  ||||   TIMESTAMP  FUNCTION
#              | |         |   ||||      |         |
        modprobe-8139    [076] .... 26013.243861: module_get: sha2_ce call_site=crypto_mod_get refcnt=3
        modprobe-8139    [076] .... 26013.244084: module_put: sha2_ce call_site=crypto_mod_put refcnt=2
        modprobe-8139    [076] .... 26013.244094: module_get: hisi_hpre call_site=crypto_mod_get refcnt=2
        modprobe-8139    [076] .... 26013.245029: module_put: hisi_hpre call_site=crypto_mod_put refcnt=1
        modprobe-8139    [076] .N.. 26013.268177: module_put: softdog call_site=do_init_module refcnt=1
        modprobe-8204    [076] .... 26319.039041: module_get: sha2_ce call_site=crypto_mod_get refcnt=3
        modprobe-8204    [076] .... 26319.039266: module_put: sha2_ce call_site=crypto_mod_put refcnt=2
        modprobe-8204    [076] .... 26319.039276: module_get: hisi_hpre call_site=crypto_mod_get refcnt=2
        modprobe-8204    [076] .... 26319.040220: module_put: hisi_hpre call_site=crypto_mod_put refcnt=1
        modprobe-8204    [076] .N.. 26319.063150: module_put: softdog call_site=do_init_module refcnt=1
             cat-8208    [076] .... 26335.674296: module_get: sbsa_gwdt call_site=watchdog_open refcnt=2
             cat-8208    [076] .N.. 26335.680374: module_put: sbsa_gwdt call_site=watchdog_release refcnt=1
        modprobe-8244    [076] .... 26466.132492: module_get: sha2_ce call_site=crypto_mod_get refcnt=3
        modprobe-8244    [076] .... 26466.132713: module_put: sha2_ce call_site=crypto_mod_put refcnt=2
        modprobe-8244    [076] .... 26466.132723: module_get: hisi_hpre call_site=crypto_mod_get refcnt=2
        modprobe-8244    [076] .... 26466.133661: module_put: hisi_hpre call_site=crypto_mod_put refcnt=1
        modprobe-8244    [076] .N.. 26466.156601: module_put: softdog call_site=do_init_module refcnt=1
             cat-8250    [076] .... 26477.606665: module_get: softdog call_site=watchdog_open refcnt=2
             cat-8250    [076] .... 26477.606667: module_get: softdog call_site=softdog_ping [softdog] refcnt=3
             cat-8250    [076] .N.. 26477.612734: module_put: softdog call_site=watchdog_release refcnt=2
[root@localhost tracing]# lsmod | grep soft
softdog                20480  1
[root@localhost tracing]# rmmod softdog
rmmod: ERROR: Module softdog is in use
[root@localhost tracing]# echo V > /dev/watchdog
[root@localhost tracing]# rmmod softdog
[root@localhost tracing]# 
[root@localhost tracing]# uname -a
Linux localhost.localdomain 5.10.0zjh01+ #13 SMP Wed Sep 20 09:14:17 CST 2023 aarch64 aarch64 aarch64 GNU/Linux
[root@localhost tracing]# 

对比5.10和6.4内核代码,softdog的逻辑没有差异。

问题现象的原因是在5.10内核上注册了sbsa_gwdt,打开/dev/watchdog设备其实不是操作的softdog,卸载后现象一致

相同物理机环境换6.4内核,sbsa_gwdt驱动也能正常加载:

[root@localhost ~]# ls /dev/watchdog
/dev/watchdog
[root@localhost ~]# 
[root@localhost ~]# 
[root@localhost ~]# 
[root@localhost ~]# 
[root@localhost ~]# lsmod | grep sbsa
sbsa_gwdt              12288  0
[root@localhost ~]# uname -a
Linux localhost.localdomain 6.4.0-8.0.0.16.oe2309.aarch64 #1 SMP Wed Sep 13 18:29:22 CST 2023 aarch64 aarch64 aarch64 GNU/Linux
[root@localhost ~]# 

综上,怀疑是测试环境加载了其他watchdog导致,请测试确认

如果后端确实是softdog,卸载前需要先写入魔术字去使能:
echo V > /dev/watchdog

Wei Li 任务状态待办的 修改为已完成
luluyuan 任务状态已完成 修改为已验收

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(3)
5329419 openeuler ci bot 1632792936 5625574 stkid 1587900794
C
1
https://gitee.com/openeuler/kernel.git
git@gitee.com:openeuler/kernel.git
openeuler
kernel
kernel

搜索帮助