Re: [PATCH -next] staging: fwserial: Switch to kvfree_rcu() API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2022/9/17 16:21, Andy Shevchenko wrote:
On Sat, Sep 17, 2022 at 5:12 AM Shang XiaoJing <shangxiaojing@xxxxxxxxxx> wrote:
Instead of invoking a synchronize_rcu() to free a pointer after a grace
period, we can directly make use of new API that does the same but in
a new

more efficient way.
...

sorry, the previous same patch have the wrong v3 flag in subject.
has

First of all, this brings even more confusion. Since the below needs
some work, we want to have a v4 with a proper changelog, explaining
also v1 and v3.

Ok, I 'll figure out a more clear changelog.

Besides, v3 is my miss, please ignore it, next patch will be v2.


...

-       synchronize_rcu();
-       kfree(peer);
+       kvfree_rcu(peer);
This is not equivalent. The commit message doesn't explain why the "v"
variant is needed. So, shouldn't it be the plain kfree_rcu()?

kfree_rcu() is defined as kvfree_rcu(), which will free the pointer with the

corresponding way(use is_vmalloc_addr() to determine vfree or kfree). For

clearlity, kfree_rcu() is a better way, will be fixed in patch v2.


Thanks :-),

Shang XiaoJing





[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux