Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754883AbYAHKp0 (ORCPT ); Tue, 8 Jan 2008 05:45:26 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752739AbYAHKol (ORCPT ); Tue, 8 Jan 2008 05:44:41 -0500 Received: from ms0.nttdata.co.jp ([163.135.193.231]:42773 "EHLO ms0.nttdata.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751006AbYAHKoi (ORCPT ); Tue, 8 Jan 2008 05:44:38 -0500 Message-Id: <20080108095006.830678835@nttdata.co.jp> References: <20080108094903.484613061@nttdata.co.jp> User-Agent: quilt/0.46-1 Date: Tue, 08 Jan 2008 18:49:24 +0900 From: Kentaro Takeda To: akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, Kentaro Takeda , Tetsuo Handa Subject: [TOMOYO #6 21/21] Add signal hooks at sleepable location. X-OriginalArrivalTime: 08 Jan 2008 09:50:06.0787 (UTC) FILETIME=[D971F130:01C851DB] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="boundary-1" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 9125 Lines: 126 --boundary-1 Content-Disposition: inline; filename="add-signal-hooks-at-sleepable-locations.patch" Content-Type: application/octect-stream Content-Transfer-Encoding: base64 VGhpcyBwYXRjaCBhZGRzIExTTSBob29rcyBmb3Igc2VuZGluZyBzaWduYWwuDQoNCiAgICogdGFz a19raWxsX3VubG9ja2VkIGlzIGFkZGVkIGluIHN5c19raWxsDQogICAqIHRhc2tfdGtpbGxfdW5s b2NrZWQgaXMgYWRkZWQgaW4gc3lzX3RraWxsDQogICAqIHRhc2tfdGdraWxsX3VubG9ja2VkIGlz IGFkZGVkIGluIHN5c190Z2tpbGwNCg0KV2Uga25vdyBzbGVlcGFibGUgaG9va3MgYXJlIHJhY3ku DQpCdXQgd2Ugd2FudCB0byBhZG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Gwo cCwgaW5mbywgc2lnLCBzZWNpZCk7DQogfQ0KIA0KK2ludCBzZWN1cml0eV90YXNrX2tpbGxfdW5s b2NrZWQoaW50IHBpZCwgaW50IHNpZykNCit7DQorCXJldHVybiBzZWN1cml0eV9vcHMtPnRhc2tf a2lsbF91bmxvY2tlZChwaWQsIHNpZyk7DQorfQ0KKw0KK2ludCBzZWN1cml0eV90YXNrX3RraWxs X3VubG9ja2VkKGludCBwaWQsIGludCBzaWcpDQorew0KKwlyZXR1cm4gc2VjdXJpdHlfb3BzLT50 YXNrX3RraWxsX3VubG9ja2VkKHBpZCwgc2lnKTsNCit9DQorDQoraW50IHNlY3VyaXR5X3Rhc2tf dGdraWxsX3VubG9ja2VkKGludCB0Z2lkLCBpbnQgcGlkLCBpbnQgc2lnKQ0KK3sNCisJcmV0dXJu IHNlY3VyaXR5X29wcy0+dGFza190Z2tpbGxfdW5sb2NrZWQodGdpZCwgcGlkLCBzaWcpOw0KK30N CisNCiBpbnQgc2VjdXJpdHlfdGFza193YWl0KHN0cnVjdCB0YXNrX3N0cnVjdCAqcCkNCiB7DQog CXJldHVybiBzZWN1cml0eV9vcHMtPnRhc2tfd2FpdChwKTsNCg0KLS0gDQo= --boundary-1-- -- 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/