Re: [linux-yocto] [PATCH 1/1] aufs5:fix:avoid to access rw_sem.owner in RT kernel

2021-03-30 Thread Bruce Ashfield
On Tue, Mar 30, 2021 at 12:26 AM Yongxin Liu  wrote:
>
> Hi Bruce,
>
> Please review whether this patch should also be applied to 
> v5.10/standard/preempt-rt.
>

Looks to me like it should also be there, and cleanly applies. So I've
merged it to the appropriate branches.

Bruce

> Thanks,
> Yongxin
> 
>


-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9626): 
https://lists.yoctoproject.org/g/linux-yocto/message/9626
Mute This Topic: https://lists.yoctoproject.org/mt/71883581/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [linux-yocto] [PATCH 1/1] aufs5:fix:avoid to access rw_sem.owner in RT kernel

2021-03-29 Thread Yongxin Liu
Hi Bruce,

Please review whether this patch should also be applied to 
v5.10/standard/preempt-rt.

Thanks,
Yongxin

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9621): 
https://lists.yoctoproject.org/g/linux-yocto/message/9621
Mute This Topic: https://lists.yoctoproject.org/mt/71883581/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[linux-yocto] [PATCH 1/1] aufs5:fix:avoid to access rw_sem.owner in RT kernel

2020-03-11 Thread Xu, Yanfei
From: Yanfei Xu 

Fix build failure.

owner member is now made a permanent member of the rw_semaphore in
v5.6 kernel(commitid:c71fd893f). But the rw_semaphore in RT kernel
had been implemented with rt_mutex in rwsem-rt.h. Add if statment
to distinguish the two cases.

-Error messages-
|
/buildarea1/nightly/WRLINUX_MASTER_WR/build_dir/OVP/GIT_202003/lxbuilds/intel-x86-64-preempt-rt-ovp-kvm/wrlinux/build_linux/tmp-glibc/work-shared/intel-x86-64/kernel-source/fs/aufs/i_op.c:
In function 'au_pin_hdir_set_owner':
|
/buildarea1/nightly/WRLINUX_MASTER_WR/build_dir/OVP/GIT_202003/lxbuilds/intel-x86-64-preempt-rt-ovp-kvm/wrlinux/build_linux/tmp-glibc/work-shared/intel-x86-64/kernel-source/fs/aufs/i_op.c:643:45:
error: 'struct rw_semaphore' has no member named 'owner'
|   643 |  atomic_long_set(>hdir->hi_inode->i_rwsem.owner,
(long)task);
|   | ^
|   CC  fs/btrfs/zstd.o
|   AR  fs/kernfs/built-in.a
|   CC  arch/x86/kernel/io_delay.o
|   CC  net/ipv6/udplite.o
| make[3]: ***
[/buildarea1/nightly/WRLINUX_MASTER_WR/build_dir/OVP/GIT_202003/lxbuilds/intel-x86-64-preempt-rt-ovp-kvm/wrlinux/build_linux/tmp-glibc/work-shared/intel-x86-64/kernel-source/scripts/Makefile.build:265:
fs/aufs/i_op.o] Error 1
| make[3]: *** Waiting for unfinished jobs
--

Signed-off-by: Yanfei Xu 
---
 fs/aufs/i_op.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/fs/aufs/i_op.c b/fs/aufs/i_op.c
index ef1e08c7ca10..926795a0101c 100644
--- a/fs/aufs/i_op.c
+++ b/fs/aufs/i_op.c
@@ -640,7 +640,11 @@ int au_pin_hdir_relock(struct au_pin *p)
 
 static void au_pin_hdir_set_owner(struct au_pin *p, struct task_struct *task)
 {
+#if !defined(CONFIG_PREEMPT_RT)
atomic_long_set(>hdir->hi_inode->i_rwsem.owner, (long)task);
+#else
+p->hdir->hi_inode->i_rwsem.rtmutex.owner = task;
+#endif
 }
 
 void au_pin_hdir_acquire_nest(struct au_pin *p)
-- 
2.24.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#8475): 
https://lists.yoctoproject.org/g/linux-yocto/message/8475
Mute This Topic: https://lists.yoctoproject.org/mt/71883581/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-