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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220827160922.642zlcd5foopozru@pengutronix.de>
Date:   Sat, 27 Aug 2022 18:09:22 +0200
From:   Marc Kleine-Budde <mkl@...gutronix.de>
To:     Csókás Bence <csokas.bence@...lan.hu>
Cc:     netdev@...r.kernel.org, Richard Cochran <richardcochran@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, qiangqing.zhang@....com,
        Andrew Lunn <andrew@...n.ch>, kernel@...gutronix.de
Subject: BUG: Re: [PATCH v3 resubmit] fec: Restart PPS after link state change

On 22.08.2022 10:10:52, Csókás Bence wrote:
> On link state change, the controller gets reset,
> causing PPS to drop out and the PHC to lose its
> time and calibration. So we restart it if needed,
> restoring calibration and time registers.
> 
> Changes since v2:
> * Add `fec_ptp_save_state()`/`fec_ptp_restore_state()`
> * Use `ktime_get_real_ns()`
> * Use `BIT()` macro
> Changes since v1:
> * More ECR #define's
> * Stop PPS in `fec_ptp_stop()`
> 
> Signed-off-by: Csókás Bence <csokas.bence@...lan.hu>

current net-next/main fails on my imx6 with:

| [   14.001542] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:283                                                                                                 
| [   14.010604] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 13, name: kworker/0:1                                                                                                     
| [   14.018737] preempt_count: 201, expected: 0                                                                                                                                                  
| [   14.022931] CPU: 0 PID: 13 Comm: kworker/0:1 Not tainted 6.0.0-rc2+ #225                                                                                                                     
| [   14.029643] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)                                                                                                                       
| [   14.036175] Workqueue: events_power_efficient phy_state_machine                                                                                                                              
| [   14.042121] [<c010ffe0>] (unwind_backtrace) from [<c010ac04>] (show_stack+0x10/0x14)                                                                                                         
| [   14.049889] [<c010ac04>] (show_stack) from [<c0ccab04>] (dump_stack_lvl+0x40/0x4c)                                                                                                           
| [   14.057479] [<c0ccab04>] (dump_stack_lvl) from [<c014ed7c>] (__might_resched+0x11c/0x154)                                                                                                    
| [   14.065678] [<c014ed7c>] (__might_resched) from [<c0cd9c20>] (mutex_lock+0x18/0x58)                                                                                                          
| [   14.073356] [<c0cd9c20>] (mutex_lock) from [<c082b59c>] (fec_ptp_gettime+0x2c/0xc4)                                                                                                          
| [   14.081035] [<c082b59c>] (fec_ptp_gettime) from [<c082bff4>] (fec_ptp_save_state+0x14/0x50)                                                                                                  
| [   14.089403] [<c082bff4>] (fec_ptp_save_state) from [<c0826ee0>] (fec_restart+0x40/0x6f4)                                                                                                     
| [   14.097510] [<c0826ee0>] (fec_restart) from [<c082b170>] (fec_enet_adjust_link+0xb0/0x21c)                                                                                                   
| [   14.105789] [<c082b170>] (fec_enet_adjust_link) from [<c0819bb4>] (phy_link_change+0x28/0x54)                                                                                                
| [   14.114333] [<c0819bb4>] (phy_link_change) from [<c0815688>] (phy_check_link_status+0x78/0xb4)
| [   14.122969] [<c0815688>] (phy_check_link_status) from [<c0816bec>] (phy_state_machine+0x68/0x29c)
| [   14.131857] [<c0816bec>] (phy_state_machine) from [<c0140604>] (process_one_work+0x1f8/0x410)
| [   14.140398] [<c0140604>] (process_one_work) from [<c01419c8>] (worker_thread+0x2c/0x544)
| [   14.148502] [<c01419c8>] (worker_thread) from [<c0148a4c>] (kthread+0xe4/0xf0)
| [   14.155739] [<c0148a4c>] (kthread) from [<c0100170>] (ret_from_fork+0x14/0x24)
| [   14.162973] Exception stack(0xc2097fb0 to 0xc2097ff8)
| [   14.168032] 7fa0:                                     00000000 00000000 00000000 00000000
| [   14.176217] 7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
| [   14.184402] 7fe0: 00000000 00000000 00000000 00000000 00000013 00000000
| [   14.191309] fec 2188000.ethernet lan0: Link is Up - 100Mbps/Full - flow control rx/tx

Reverting this patch "fixes" the problem.

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ