Re: [PATCH net-next 1/7] r8152: adjust rx_bottom

From: David Miller
Date: Mon Jan 19 2015 - 16:13:39 EST


From: Scott Feldman <sfeldma@xxxxxxxxx>
Date: Mon, 19 Jan 2015 00:03:42 -0800

> On Sun, Jan 18, 2015 at 11:13 PM, Hayes Wang <hayeswang@xxxxxxxxxxx> wrote:
>> @@ -1746,7 +1746,18 @@ find_next_rx:
>> }
>>
>> submit:
>> - r8152_submit_rx(tp, agg, GFP_ATOMIC);
>> + if (!ret) {
>> + ret = r8152_submit_rx(tp, agg, GFP_ATOMIC);
>> + } else {
>> + urb->actual_length = 0;
>> + list_add_tail(&agg->list, next);
>
> Do you need a spin_lock_irqsave(&tp->rx_lock, flags) around this?

Indeed, and rtl_start_rx() seems to also access agg->list without
proper locking.
--
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/