[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2409617.cBYgoVRs56@localhost.localdomain>
Date: Sat, 16 Oct 2021 20:53:15 +0200
From: "Fabio M. De Francesco" <fmdefrancesco@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Martin Kaiser <martin@...ser.cx>
Cc: Larry Finger <Larry.Finger@...inger.net>,
Phillip Potter <phil@...lpotter.co.uk>,
Michael Straube <straube.linux@...il.com>,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
Martin Kaiser <martin@...ser.cx>
Subject: Re: [PATCH 3/3] staging: r8188eu: don't accept SIGTERM for cmd thread
On Saturday, October 16, 2021 8:13:43 PM CEST Martin Kaiser wrote:
> At the moment, our command thread can be killed by user space.
>
> [root@...t ]# kill `pidof RTW_CMD_THREAD`
>
> The driver will then stop working until the module is unloaded
> and reloaded.
>
> Don't process SIGTERM in the command thread. Other drivers that have a
> command thread don't process SIGTERM either.
Hi Martin,
This is _really_ interesting :)
May be that you have had time to read my last email in reply to a message of
Phillip P. Soon after writing of the arguments in favor of using
wait_for_completion_killable() (in patch 2/3 of the series I sent today), I
read your patch.
If you are right (and I think you are) I'll have to send a v2 that replaces
the killable wait with an uninterruptible one.
Unfortunately I have not the needed experience to decide whether or not to
ack your patch, even if I'm strongly tempted to do it.
Let's wait for more experienced people.
Thanks,
Fabio
>
> Signed-off-by: Martin Kaiser <martin@...ser.cx>
> ---
> drivers/staging/r8188eu/core/rtw_cmd.c | 2 --
> drivers/staging/r8188eu/include/osdep_service.h | 5 -----
> 2 files changed, 7 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/
r8188eu/core/rtw_cmd.c
> index e17332677daa..b834fac41627 100644
> --- a/drivers/staging/r8188eu/core/rtw_cmd.c
> +++ b/drivers/staging/r8188eu/core/rtw_cmd.c
> @@ -243,8 +243,6 @@ int rtw_cmd_thread(void *context)
> struct adapter *padapter = (struct adapter *)context;
> struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
>
> - thread_enter("RTW_CMD_THREAD");
> -
> pcmdbuf = pcmdpriv->cmd_buf;
>
> pcmdpriv->cmdthd_running = true;
> diff --git a/drivers/staging/r8188eu/include/osdep_service.h b/drivers/
staging/r8188eu/include/osdep_service.h
> index ee8a64bb3126..886a1b6f30b4 100644
> --- a/drivers/staging/r8188eu/include/osdep_service.h
> +++ b/drivers/staging/r8188eu/include/osdep_service.h
> @@ -160,11 +160,6 @@ static inline unsigned char _cancel_timer_ex(struct
timer_list *ptimer)
> return del_timer_sync(ptimer);
> }
>
> -static __inline void thread_enter(char *name)
> -{
> - allow_signal(SIGTERM);
> -}
> -
> static inline void flush_signals_thread(void)
> {
> if (signal_pending (current))
> --
> 2.20.1
>
>
>
Powered by blists - more mailing lists