Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2617408pxb; Sun, 17 Oct 2021 20:39:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztiDvP7ybWiz865LZX4CTuDwbMNsX5QpLcDumlcYurNoXS7zfhLh974bsmI7Jdq7A0xU+m X-Received: by 2002:a05:6a00:14c6:b0:44d:4f03:78ff with SMTP id w6-20020a056a0014c600b0044d4f0378ffmr6312104pfu.13.1634528341829; Sun, 17 Oct 2021 20:39:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634528341; cv=none; d=google.com; s=arc-20160816; b=tv4/4iK8nN+BnmwHn+J5odUTHmH/k+b2vV9aXeLHraaVGoYTPDJomGLxdLYglGFIt8 hpeXKAfgLrW8vZYTu1zhcBOuE3ANf3ahAk+4n83XyINcYkeG0QLpHIx7HDt4QfX32/br 1MnHqHwg0nm47U17imkJvtdfXtpCoN9jRiSUNDwHAdakAo5tXVUnvdUEI0ylQpIsK8+P DWgZOUNJ2lPj/OSUNSEBra07VevyVHOEPTqVbOK5C+zrmSj5K02dCWyQucnIua4P6GrP TixdiHS+WoI1wzj9mExLb/vXlhHcrGkp8JGRDxL8rDM6uk43zfybjl7H5jlLXsZBNpl5 hebg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=mdUGXRGbdT675WKdLOsPUMVP1mrD2Y35uxRDEzvLS9E=; b=kwic/fKELm94uzwA3IPNhEbnlxnqJ87gHOanBsYMNsXfQjIJ/WzDwcNlM+yckMbW2O IKY9j48cddNFlIX5d+KZN5+jkjOqjv4OdjQeVEbVVzKLc7429rU7oKPxESoDMHT4sK06 3mjh2PJD/2hq4nIxAhgb/IT7ZdAiAj2vvgeyzfow2ZNSORN9p55nWXC8cn9oSCMDQUgD mcsy6su4kJ+blKnyTjZMOJ+u8rF/O7YVOSTUQ+fyHVI9mbGPFSjnxT080FmvuBb2/GUg pL/bRFE4ChA1Sxc5E7ssAQ5bNPCEdfbYEYLlg8lCvm4VEjHLwWhO5a35/EfNaXqx6Jyw 9Imw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k3si17927538pgl.511.2021.10.17.20.38.46; Sun, 17 Oct 2021 20:39:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244554AbhJPSQV (ORCPT + 98 others); Sat, 16 Oct 2021 14:16:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244534AbhJPSQT (ORCPT ); Sat, 16 Oct 2021 14:16:19 -0400 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D6A8C061765 for ; Sat, 16 Oct 2021 11:14:11 -0700 (PDT) Received: from ipservice-092-217-067-147.092.217.pools.vodafone-ip.de ([92.217.67.147] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1mboC7-0006wS-0v; Sat, 16 Oct 2021 20:14:07 +0200 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 3/3] staging: r8188eu: don't accept SIGTERM for cmd thread Date: Sat, 16 Oct 2021 20:13:43 +0200 Message-Id: <20211016181343.3686-4-martin@kaiser.cx> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20211016181343.3686-1-martin@kaiser.cx> References: <20211016181343.3686-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At the moment, our command thread can be killed by user space. [root@host ]# 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. Signed-off-by: Martin Kaiser --- 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