All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug?] netfilter/ipvs : suspected race bugs related to atomic operations
@ 2009-08-12 14:43 홍신 shin hong
  2009-08-13 13:44 ` Patrick McHardy
  0 siblings, 1 reply; 4+ messages in thread
From: 홍신 shin hong @ 2009-08-12 14:43 UTC (permalink / raw)
  To: netfilter-devel

Hi. I am reporting two suspected race bug related to atomic operations
while I read net/netfilter/ipvs of Linux 2.6.30.4.

(1) In net/netfilter/ipvs/ip_vs_core.c, ip_vs_in() first increments &cp->in_pkts
     and then reads variable for condition checking at line 1346-1351.

     However, these two atomic operations may not be executed atomically.
     For this reason, it may result race with other concurrent executions
     which manipulates &cp->in_pkts.

(2) In net/netfilter/ipvs/ip_vs_wrr.c, ip_vs_wrr_max_weight() first
checks &dest->weight
     and then reads the variable again to assign its value to a local variable.
     For the similar reason above, it seems that two atomic_read() operations
     may result different values so that it may result race condition.

Please examine the code and let me know your opinion. Thanks.

Sincerely
Shin Hong

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-08-13 22:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-12 14:43 [bug?] netfilter/ipvs : suspected race bugs related to atomic operations 홍신 shin hong
2009-08-13 13:44 ` Patrick McHardy
2009-08-13 22:43   ` Simon Horman
2009-08-13 22:56     ` Simon Horman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.