Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3347385ybi; Mon, 29 Jul 2019 05:08:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqwyiynFdj6mvqzjF+kw8OMgDn30gYoD+xwLkV6VqvpF9YtrBOKLdpUvdGa++9HOVYYiq7LD X-Received: by 2002:a17:90a:2767:: with SMTP id o94mr108149604pje.25.1564402092686; Mon, 29 Jul 2019 05:08:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564402092; cv=none; d=google.com; s=arc-20160816; b=giFGzufMjEMq9ygIXwzskfVeUVyMaViWmXQIEFQa2B2xUkd+BnOctjJ93HwCKX//ql 2JxSRl0uH6F30qVBtuDWbhPYE2jlsnMDHNS4Jy92YGOMFD8S+KexaS5CWVmN8UxxxXfk xIJgwRoBI1Hn3SeUTEgDQHccyS/8xMdx7QblWKCRDnGyHitCU85ivVOaofl3hXqboZqO zTa/+L88Vdjbmbfi8EtPj0sHdTUxc8e1L8yPPtA19jfuI6U9tB5sBIKSlffpIg04G2aJ hylfKmF2yIh94w4w0epr7nqbMmWQTHlfJIITcCAfTKt8USyr38MIROVumJiEliO2DckY BsYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=1oADSOD4kjZ1dqW/2Ui0ZnHxXiMQh/ptauFbEpo8Vo8=; b=oK0YNi7Wzsjw0Sqd5ZRtB51WuN8uu8Tzb/+zYIZNeAL3yQQvpfFhhWWURH3hM6I0UJ +n+Px4AwIpG+662et6/LzmiVGPBeURVqdE1dskjzZUnAF0bEEsMsZZGDuK19yjY0Iw2W 1p2L57uIchECbJf24DbZnM33wJcxSOixz60LuNDbWnib8ZSPmSXAHAftHLYMGmsn9kB9 RcSJPfjxK1jGU82/e9jUaxwPdaW4npTTeMlYqzWnGWcmbj1zz9CkBmJtboIN2dB0wAmD iBIQtgmXOw9h5LxTv2P6Nohf/H6Rg1XWQStNClGuDWzj3FRAm0tMm8SnwCXh5ldZ3/3+ jMPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linbit-com.20150623.gappssmtp.com header.s=20150623 header.b=r6Umbo20; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g13si27783238pfo.22.2019.07.29.05.07.56; Mon, 29 Jul 2019 05:08:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linbit-com.20150623.gappssmtp.com header.s=20150623 header.b=r6Umbo20; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727723AbfG2Idy (ORCPT + 99 others); Mon, 29 Jul 2019 04:33:54 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:43291 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727109AbfG2Idy (ORCPT ); Mon, 29 Jul 2019 04:33:54 -0400 Received: by mail-wr1-f67.google.com with SMTP id p13so60783850wru.10 for ; Mon, 29 Jul 2019 01:33:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linbit-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=1oADSOD4kjZ1dqW/2Ui0ZnHxXiMQh/ptauFbEpo8Vo8=; b=r6Umbo20Hap5YkpBHAoy7Vc3/ihU0piqjaCdPXTVL7nw+8vYKjAAzxohdcz9o/y51r TyrDkzFAs1R6ZHZ06c7O2BZMT6j/S4MCfalfInn14cvf0WWAHPzih3ZYjvLga/XFZiR/ DvHsjlNNk1nD+JNTMGbENean0MjqOr/l1tK4708UbzMCUGm3b2PE3Q713mr+v3O1h9Kv HAZZXRXSF5JcftNmdjQV88kx67XoklUDEPaFDWkHhU37MR9YlxL3CjUx/VdTIBPyx3sL utvpItaXj0qSOAjdnZZIegVXlVhHo27Usofbwu/bsI4swva9jCg11XH9ViCVaFyozwR6 ox6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=1oADSOD4kjZ1dqW/2Ui0ZnHxXiMQh/ptauFbEpo8Vo8=; b=lJw48FVQQTo4LekgFNEVeAtDKzw/Z7zGENIkrXBFOQ+IPJ6Ys3gFbs9J6vc3Fd37bo slNX9WMYqO6RA+H1kR5uImrMVg9bpuUFpGoVAq680HmDvcvrJPwmnJiWziUx/GbalStl yvjU0Ax0Mc4eHcqoxbwLqKXybX8ZMIEfHT6rB2rqF/dXSyYqD1dZ/rWuCFEo9XwId9g1 2BM8wcbb/319EtEnPd6dw5hItC/YpMBkN/JKOI5l5wpOR0z21WeHjqMjwSMtkZPV13MB aHTX1zLnZ2k4PvLOTKn2KLZdWC4H/upKM85WDpEqd2qTP2Gico0fjxq7AcfS0ApWjPR3 GCkw== X-Gm-Message-State: APjAAAUpTxvdWb5oHwoG1JQ2VMPvVOO0GmZV3Nx/0QPGbxHiAiC5vvxc 9LtRtTeJ9RkMuxeDwi6RRevVzzjE+XHLRw== X-Received: by 2002:adf:e40e:: with SMTP id g14mr35397526wrm.161.1564389232614; Mon, 29 Jul 2019 01:33:52 -0700 (PDT) Received: from gintonic.linbit ([2001:858:107:1:6428:48d1:352:f871]) by smtp.gmail.com with ESMTPSA id b2sm77606191wrp.72.2019.07.29.01.33.51 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 29 Jul 2019 01:33:52 -0700 (PDT) From: =?UTF-8?q?Christoph=20B=C3=B6hmwalder?= To: linux-kernel@vger.kernel.org Cc: "Eric W . Biederman" , Jens Axboe , =?UTF-8?q?Christoph=20B=C3=B6hmwalder?= , Philipp Reisner , stable@vger.kernel.org Subject: [PATCH] drbd: do not ignore signals in threads Date: Mon, 29 Jul 2019 10:32:48 +0200 Message-Id: <20190729083248.30362-1-christoph.boehmwalder@linbit.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix a regression introduced by upstream commit fee109901f39 ('signal/drbd: Use send_sig not force_sig'). Currently, when a thread is initialized, all signals are set to be ignored by default. DRBD uses SIGHUP to end its threads, which means it is now no longer possible to bring down a DRBD resource because the signals do not make it through to the thread in question. This circumstance was previously hidden by the fact that DRBD used force_sig() to kill its threads. The aforementioned upstream commit changed this to send_sig(), which means the effects of the signals being ignored by default are now becoming visible. Thus, issue an allow_signal() at the start of the thread to explicitly allow the desired signals. Signed-off-by: Christoph Böhmwalder Signed-off-by: Philipp Reisner Fixes: fee109901f39 ("signal/drbd: Use send_sig not force_sig") Cc: stable@vger.kernel.org --- drivers/block/drbd/drbd_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 9bd4ddd12b25..b8b986df6814 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c @@ -318,6 +318,9 @@ static int drbd_thread_setup(void *arg) unsigned long flags; int retval; + allow_signal(DRBD_SIGKILL); + allow_signal(SIGXCPU); + snprintf(current->comm, sizeof(current->comm), "drbd_%c_%s", thi->name[0], resource->name); -- 2.22.0