File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 13981398 return 0 ;
13991399 }
14001400
1401- static inline int wc_LockMutex (wolfSSL_Mutex * m )
1401+ static __must_check inline int wc_LockMutex (wolfSSL_Mutex * m )
14021402 {
14031403 if (in_nmi () || hardirq_count () || in_softirq ())
14041404 return -1 ;
14431443 /* wc_lkm_LockMutex() can't be used inline in __PIE__ objects, due to
14441444 * direct access to pv_ops.
14451445 */
1446- static __always_inline int wc_LockMutex (wolfSSL_Mutex * m )
1446+ static __must_check __always_inline int wc_LockMutex (wolfSSL_Mutex * m )
14471447 {
14481448 return WC_PIE_INDIRECT_SYM (wc_lkm_LockMutex )(m );
14491449 }
14501450
14511451 #else /* !__PIE__ */
14521452
1453- static __always_inline int wc_LockMutex (wolfSSL_Mutex * m )
1453+ static __must_check __always_inline int wc_LockMutex (wolfSSL_Mutex * m )
14541454 {
14551455 return wc_lkm_LockMutex (m );
14561456 }
Original file line number Diff line number Diff line change @@ -172,11 +172,14 @@ int wc_lkm_LockMutex(wolfSSL_Mutex* m)
172172 }
173173 else {
174174 for (;;) {
175+ int sig_ret = wc_linuxkm_check_for_intr_signals ();
176+ if (sig_ret )
177+ return sig_ret ;
178+ cond_resched ();
175179 if (spin_trylock_irqsave (& m -> lock , irq_flags )) {
176180 m -> irq_flags = irq_flags ;
177181 return 0 ;
178182 }
179- cond_resched ();
180183 }
181184 }
182185 __builtin_unreachable ();
You can’t perform that action at this time.
0 commit comments