From patchwork Tue Jul 31 21:00:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Fields X-Patchwork-Id: 1262081 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 3FD313FC71 for ; Tue, 31 Jul 2012 21:00:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753334Ab2GaVAz (ORCPT ); Tue, 31 Jul 2012 17:00:55 -0400 Received: from fieldses.org ([174.143.236.118]:37004 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753458Ab2GaVAx (ORCPT ); Tue, 31 Jul 2012 17:00:53 -0400 Received: from bfields by fieldses.org with local (Exim 4.72) (envelope-from ) id 1SwJYi-0008Nv-OR; Tue, 31 Jul 2012 17:00:52 -0400 From: "J. Bruce Fields" To: Steve Dickson Cc: Jim Rees , linux-nfs@vger.kernel.org, "J. Bruce Fields" Subject: [PATCH 2/4] rpc.gssd: don't call printerr from signal handler Date: Tue, 31 Jul 2012 17:00:47 -0400 Message-Id: <1343768449-32205-2-git-send-email-bfields@redhat.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <20120731205931.GA32161@fieldses.org> References: <20120731205931.GA32161@fieldses.org> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: "J. Bruce Fields" printerr() isn't actually safe to call from a signal handler. It might be possible to make it so, but I think this is the only case in nfs-utils where we try to, and I'm not convince it's worth it. This fixes a bug that would eventually cause mounts to hang when gssd is run with -vv. Signed-off-by: J. Bruce Fields --- utils/gssd/gssd_main_loop.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/utils/gssd/gssd_main_loop.c b/utils/gssd/gssd_main_loop.c index 9954ffb..6914687 100644 --- a/utils/gssd/gssd_main_loop.c +++ b/utils/gssd/gssd_main_loop.c @@ -61,10 +61,8 @@ extern int pollsize; static volatile int dir_changed = 1; -static void dir_notify_handler(int sig) +static void dir_notify_handler(__attribute__((unused))int sig) { - printerr(2, "dir_notify_handler: sig %d\n", sig); - dir_changed = 1; }