Re: Re: [PATCH v4] pipe: use __pipe_{lock,unlock} instead of spinlock

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

 



Hi Linus,

On 2023/1/29 下午3:33, Linus Torvalds wrote:
On Sat, Jan 28, 2023 at 10:05 PM Hongchen Zhang
<zhanghongchen@xxxxxxxxxxx> wrote:

Use spinlock in pipe_{read,write} cost too much time,IMO
pipe->{head,tail} can be protected by __pipe_{lock,unlock}.
On the other hand, we can use __pipe_{lock,unlock} to protect
the pipe->{head,tail} in pipe_resize_ring and
post_one_notification.

No, we really can't.

post_one_notification() is called under the RCU lock held, *and* with
a spinlock held.

It simply cannot do a sleeping lock like __pipe_lock().

So that patch is simply fundamentally buggy, I'm afraid.

                 Linus

Thanks for your review,Let me find out if there is any way to solve the
problem you said.

Best Regards
Hongchen Zhang




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux