Re: A possible bug in reqsk_queue_hash_req()

From: Li Yu
Date: Tue Apr 20 2010 - 22:02:21 EST


Eric Dumazet åé:
> Le mardi 20 avril 2010 Ã 21:21 +0800, Li Yu a Ãcrit :
>
>> In my word, write lock also means mutual exclusion among all writers,
>> is it right?
>>
>
> Yes, generally speaking.
>
> But not on this use case.
>
> This is documented in an include file, if you search for syn_wait_lock
>
>>> All callers of this reqsk_queue_hash_req() must have the socket locked
>> See. If we always assumed the caller should hold the locked socket
>> first, this is not a bug, but I think we'd better add a comment at
>> header file.
>
> It is documented, as a matter of fact :)
>
>

Great, this isn't a bug, you are right here :)

I just found out these comments about syn_wait_lock, it seem that we need to crossed reference documents for kernel API, a newbie like me, may confused at such similar problems.


>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/