From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24707 invoked by alias); 15 Jul 2011 11:47:52 -0000 Received: (qmail 24698 invoked by uid 22791); 15 Jul 2011 11:47:51 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_GF X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 15 Jul 2011 11:47:37 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p6FBlamK031447 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 15 Jul 2011 07:47:36 -0400 Received: from springer.wildebeest.org (ovpn-113-45.phx2.redhat.com [10.3.113.45]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p6FBlZaj000769 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 15 Jul 2011 07:47:36 -0400 Received: by springer.wildebeest.org (Postfix, from userid 500) id AECB14AEE8; Fri, 15 Jul 2011 13:47:34 +0200 (CEST) Subject: The dropped file From: Mark Wielaard To: systemtap@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Date: Fri, 15 Jul 2011 11:47:00 -0000 Message-ID: <1310730454.7351.7.camel@springer.wildebeest.org> Mime-Version: 1.0 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2011-q3/txt/msg00027.txt.bz2 Hi, The relay_v2 transport creates a "dropped" file in the debugfs dir of the module. This file is created with mode 0444 and so is readable for everybody. That can at times lead to weird behavior since if somebody has that file open the module can no longer unload, leading to a successful script erroring out. Now this might not happen often, it was a weird script I was running that caused it, but it seems just creating the file with mode 0400 seems to work fine, and guards me from stupid scripts. So I am testing that, but don't fully understand what reads the dropped file on the other end. Anybody? Thanks, Mark diff --git a/runtime/transport/relay_v2.c b/runtime/transport/relay_v2.c index 562bcdc..ff621a4 100644 --- a/runtime/transport/relay_v2.c +++ b/runtime/transport/relay_v2.c @@ -287,7 +287,7 @@ static int _stp_transport_data_fs_init(void) =20 /* Create "dropped" file. */ _stp_relay_data.dropped_file - =3D debugfs_create_file("dropped", 0444, _stp_get_module_di= r(), + =3D debugfs_create_file("dropped", 0400, _stp_get_module_di= r(), NULL, &__stp_relay_dropped_fops); if (!_stp_relay_data.dropped_file) { rc =3D -EIO;