OpenVZ Forum

Home » Mailing lists » Devel » [PATCH 3/3] Fix race in ipv6_flowlabel_opt() when inserting two labels
Re: [PATCH 3/3] Fix race in ipv6_flowlabel_opt() when inserting two labels [message #21998 is a reply to message #21991] Thu, 18 October 2007 12:19 Go to previous message
davem is currently offline  davem
Messages: 463
Registered: February 2006
Senior Member
From: Pavel Emelyanov <>
Date: Thu, 18 Oct 2007 15:59:14 +0400

> In the IPV6_FL_A_GET case the hash is checked for flowlabels
> with the given label. If it is not found, the lock, protecting 
> the hash, is dropped to be re-get for writing. After this a
> newly allocated entry is inserted, but no checks are performed
> to catch a classical SMP race, when the conflicting label may 
> be inserted on another cpu.
> Use the (currently unused) return value from fl_intern() to
> return the conflicting entry (if found) and re-check, whether
> we can reuse it (IPV6_FL_F_EXCL) or return -EEXISTS.
> Also add the comment, about why not re-lookup the current
> sock for conflicting flowlabel entry.
> Signed-off-by: Pavel Emelyanov <>

Read Message
Read Message
Previous Topic: [PATCH 1/3] Lost locking when inserting a flowlabel in ipv6_fl_list
Next Topic: [PATCH 2/3] Lost locking in fl6_sock_lookup
Goto Forum:

Current Time: Mon Feb 26 05:28:51 GMT 2024

Total time taken to generate the page: 0.02950 seconds