lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 24 Jan 2015 22:43:42 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	hayeswang@...ltek.com
Cc:	sfeldma@...il.com, netdev@...r.kernel.org, nic_swsd@...ltek.com,
	linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org
Subject: Re: [PATCH net-next 1/7] r8152: adjust rx_bottom

From: Hayes Wang <hayeswang@...ltek.com>
Date: Tue, 20 Jan 2015 03:24:52 +0000

>  David Miller [mailto:davem@...emloft.net] 
>> Sent: Tuesday, January 20, 2015 10:52 AM
> [...]
>> agg->list is not local, you have to use a spinlock to protect
>> modifications to it, some other sites which modify agg->list do take
>> the lock properly.
>> 
>> You cannot modify a list like agg->list without proper locking.
> 
> Excuse me. I don't understand.
> 
> Before step1
>    tp_rx_done->listA->listB->listC->listD->...
>    rx_queue->
> Because the other function would chage tp->rx_done,
> I need move the lists with spin lock.
> 
> After step1
>    tp_rx_done->
>    rx_queue->listA->listB->listC->listD->...
> 
> Now I dequeue one of the lists from the list_head and
> deal with it.
>    tp_rx_done->
>    rx_queue->listA->listC->listD->...
>                     listB
> 
> Then, if I want to put it back to rx_queue, I have to
> use spin lock. Why? No other function would chage
> rx_queue and the items in it.

What keeps rtl_start_rx() from running in parallel with
r8152_submit_rx(), or any other accessor of the RX agg->list?

You also keep using different terminology from me when
discussing what lists do or do not need protection, and that
is going to make it difficult for anyone to follow our
conversation at all.

We're talking specifically about RX agg->list objects and
whether access to them need synchronization or not.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ