Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756315AbbGTTmo (ORCPT ); Mon, 20 Jul 2015 15:42:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41352 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756210AbbGTTml (ORCPT ); Mon, 20 Jul 2015 15:42:41 -0400 Date: Mon, 20 Jul 2015 21:40:51 +0200 From: Oleg Nesterov To: Jiri Slaby Cc: Patrick Donnelly , Greg Kroah-Hartman , open list , openSUSE Kernel Subject: Re: [PATCH v4] tty: add missing rcu_read_lock for task_pgrp Message-ID: <20150720194051.GA21204@redhat.com> References: <1435439824-3975-1-git-send-email-batrick@batbytes.com> <1436741512-992-1-git-send-email-batrick@batbytes.com> <55ACBEBC.5060505@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55ACBEBC.5060505@suse.cz> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 749 Lines: 23 On 07/20, Jiri Slaby wrote: > > CC Oleg > > On 07/13/2015, 12:51 AM, Patrick Donnelly wrote: > > task_pgrp requires an rcu or tasklist lock to be obtained if the returned pid > > is to be dereferenced, which kill_pgrp does. Obtain an RCU lock for the > > duration of use. Look like, this change is right. But perhaps we should a simple helper for drivers/tty/ which takes rcu lock, sends a signal to task_pgrp(current), and sets TIF_SIGPENDING? I won't insist of course, I am fine either way. Oleg. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/