[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m1hbwlkzt6.fsf@fess.ebiederm.org>
Date: Thu, 06 Aug 2009 03:21:41 -0700
From: ebiederm@...ssion.com (Eric W. Biederman)
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: Paul Moore <paul.moore@...com>, netdev@...r.kernel.org,
David Miller <davem@...emloft.net>
Subject: Re: [RFC PATCH v1] tun: Cleanup error handling in tun_set_iff()
Herbert Xu <herbert@...dor.apana.org.au> writes:
> On Wed, Aug 05, 2009 at 05:38:42PM -0400, Paul Moore wrote:
>>
>> My concern is that I believe that if the kernel fails at an operation it
>> should do all it can to unwind any actions it took in the course of attempting
>> to perform the requested operation. Leaving a TUN device around in the case
>> of a tun_attach() failure seems like the kernel is being lazy, sure a user can
>> cleanup the device but why should they have to?
>
> That particular tun_attach should never fail. Perhaps you can
> just add a WARN_ON.
Two threads one file descriptor. Both simultaneously attempt to
attach to a tun device. One will fail, the other succeed.
At least that is how I read the locking.
Eric
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists