Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161093AbWBHQTq (ORCPT ); Wed, 8 Feb 2006 11:19:46 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1161094AbWBHQTq (ORCPT ); Wed, 8 Feb 2006 11:19:46 -0500 Received: from peabody.ximian.com ([130.57.169.10]:18066 "EHLO peabody.ximian.com") by vger.kernel.org with ESMTP id S1161093AbWBHQTp (ORCPT ); Wed, 8 Feb 2006 11:19:45 -0500 Subject: Re: [PATCH] inotify: fix one-shot support From: Robert Love To: Ingo Oeser Cc: John McCutchan , Linux Kernel Mailing List In-Reply-To: <200602080852.18179.ingo@oeser-vu.de> References: <200602080105.k1815her002647@hera.kernel.org> <200602080852.18179.ingo@oeser-vu.de> Content-Type: text/plain Date: Wed, 08 Feb 2006 11:16:33 -0500 Message-Id: <1139415393.8883.193.camel@betsy.boston.ximian.com> Mime-Version: 1.0 X-Mailer: Evolution 2.4.2 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1061 Lines: 33 On Wed, 2006-02-08 at 08:52 +0100, Ingo Oeser wrote: > See, now you can just pass IN_ONESHOT behavior flag without any > events to shoot at, which you couldn't do before. But this makes only > sense, if we would like to set a multi-shot mask to one-shot now. Ack! > Does this transition (multi shot to single shot)makes sense at all? > Is it race-free to allow this?. It should be okay. This was my intention in the patch. > So my suggested fix instead of yours would be: > > /* don't let user-space set invalid bits: we don't want flags set */ > mask &= IN_ALL_EVENTS | IN_ONESHOT; > if (unlikely((mask & IN_ALL_EVENTS) == 0 && !mask_add)) { > ret = -EINVAL; > goto out; > } > > Would you like a patch on top of the one submitted by you? Yes, because my patch was already merged by Linus. Robert Love - 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/