[linux-usb-devel] Re: [PATCH 2/7] isdn4linux: Siemens Gigaset drivers - event layer

2006-02-27 Thread Arjan van de Ven
On Mon, 2006-02-27 at 07:23 +0100, Hansjoerg Lipp wrote:
 +static inline void new_index(atomic_t *index, int max)
 +{
 +   if (atomic_read(index) == max)  //FIXME race?
 +   atomic_set(index, 0);
 +   else
 +   atomic_inc(index);
 +}

yes.. that's a race.




---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: [PATCH 2/7] isdn4linux: Siemens Gigaset drivers - event layer

2006-02-27 Thread Arjan van de Ven
On Mon, 2006-02-27 at 07:23 +0100, Hansjoerg Lipp wrote:
 +   }
 +
 +   spin_lock_irqsave(cs-lock, flags);
 +   ret = kmalloc(sizeof(struct at_state_t), GFP_ATOMIC);
 +   if (ret) {
 +   gigaset_at_init(ret, NULL, cs, cid);
 

if you move the kmalloc one line up, can it use GFP_KERNEL ?
(GFP_ATOMIC is evil in the sense that spurious use of it gives trouble
for the VM)



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel