Android people, Please see inside if Android 4.9-o wants to pick up stream_open related deadlock fixes. FUSE part of it is already applied to upstream stable/linux-4.9.y as 9c829b6e3fe2 and cfd8d2e79524, but the Android tree does not have any of the fixes at all. All 3 patches should be safe to apply, but they are the least intresting bits of stream_open conversion as other changes from commit c5bf68fe0c86 (*: convert stream-like files from nonseekable_open -> stream_open) deal with several real deadlocks (and event not all of them are marked as errors in that commit). Also there is bbd84f33 (fuse: Add FOPEN_STREAM to use stream_open()) which fixes FUSE deadlock regression visible to userspace. Kirill ---- 8< ---- From: kbuild test robot Subject: [PATCH 1/3] objtool, perf: fix stream_open.cocci warnings sound/core/rawmidi.c:376:7-23: WARNING: snd_rawmidi_f_ops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open. Generated by: scripts/coccinelle/api/stream_open.cocci Signed-off-by: kbuild test robot Signed-off-by: Kirill Smelkov --- tree: https://android.googlesource.com/kernel/common android-4.9-o-mr1 head: 58ce54880a03d9c27327434ba15281f5a7139671 commit: 4864b070265301ba88506ee407d51e058dcb0ad6 [42/51] objtool, perf: Fix GCC 8 -Wrestrict error :::::: branch date: 27 hours ago :::::: commit date: 9 weeks ago Please take the patch only if it's a positive warning. Thanks! rawmidi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/sound/core/rawmidi.c +++ b/sound/core/rawmidi.c @@ -373,7 +373,7 @@ static int snd_rawmidi_open(struct inode if ((file->f_flags & O_APPEND) && !(file->f_flags & O_NONBLOCK)) return -EINVAL; /* invalid combination */ - err = nonseekable_open(inode, file); + err = stream_open(inode, file); if (err < 0) return err; ---- 8< ---- From: kbuild test robot Subject: [PATCH 2/3] objtool, perf: fix stream_open.cocci warnings sound/core/control.c:55:7-23: WARNING: snd_ctl_f_ops: .read() has stream semantic; safe to change nonseekable_open -> stream_open. Generated by: scripts/coccinelle/api/stream_open.cocci Signed-off-by: kbuild test robot Signed-off-by: Kirill Smelkov --- tree: https://android.googlesource.com/kernel/common android-4.9-o-mr1 head: 58ce54880a03d9c27327434ba15281f5a7139671 commit: 4864b070265301ba88506ee407d51e058dcb0ad6 [42/51] objtool, perf: Fix GCC 8 -Wrestrict error :::::: branch date: 27 hours ago :::::: commit date: 9 weeks ago Please take the patch only if it's a positive warning. Thanks! control.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/sound/core/control.c +++ b/sound/core/control.c @@ -52,7 +52,7 @@ static int snd_ctl_open(struct inode *in struct snd_ctl_file *ctl; int i, err; - err = nonseekable_open(inode, file); + err = stream_open(inode, file); if (err < 0) return err; ---- 8< ---- From: kbuild test robot Subject: [PATCH 3/3] objtool, perf: fix stream_open.cocci warnings sound/core/seq/seq_clientmgr.c:309:7-23: WARNING: snd_seq_f_ops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open. Generated by: scripts/coccinelle/api/stream_open.cocci Signed-off-by: kbuild test robot Signed-off-by: Kirill Smelkov --- tree: https://android.googlesource.com/kernel/common android-4.9-o-mr1 head: 58ce54880a03d9c27327434ba15281f5a7139671 commit: 4864b070265301ba88506ee407d51e058dcb0ad6 [42/51] objtool, perf: Fix GCC 8 -Wrestrict error :::::: branch date: 27 hours ago :::::: commit date: 9 weeks ago Please take the patch only if it's a positive warning. Thanks! seq_clientmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/sound/core/seq/seq_clientmgr.c +++ b/sound/core/seq/seq_clientmgr.c @@ -306,7 +306,7 @@ static int snd_seq_open(struct inode *in struct snd_seq_user_client *user; int err; - err = nonseekable_open(inode, file); + err = stream_open(inode, file); if (err < 0) return err; On Mon, Jan 13, 2020@05:18:48PM +0100, Julia Lawall wrote: > On Mon, 13 Jan 2020, Kirill Smelkov wrote: > > > +gregkh > > > > ( Greg, please see inside if Android 4.9-o wants to pick up stream_open > > related deadlock fixes. You already applied FUSE part to stable/linux-4.9.y > > as 9c829b6e3fe2 and cfd8d2e79524, but the Android tree does not have > > any of the fixes at all ) > > > > Hi Julia, > > > > On Fri, Jan 10, 2020 at 01:46:59PM +0100, Julia Lawall wrote: > > > Hi, > > > > > > Do you want to check this, and forward it on if it seems ok? > > > > > > thanks, > > > julia > > > > > > ---------- Forwarded message ---------- > > > Date: Thu, 9 Jan 2020 07:00:42 +0800 > > > From: kbuild test robot > > > To: kbuild(a)lists.01.org > > > Cc: Julia Lawall , > > > Elena Reshetova > > > Subject: [PATCH] objtool, perf: fix stream_open.cocci warnings > > > > > > CC: kbuild-all(a)lists.01.org > > > CC: Guenter Roeck > > > BCC: philip.li(a)intel.com > > > TO: cros-kernel-buildreports(a)googlegroups.com > > > > > > From: kbuild test robot > > > > > > sound/core/rawmidi.c:376:7-23: WARNING: snd_rawmidi_f_ops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open. > > > > > > Generated by: scripts/coccinelle/api/stream_open.cocci > > > > > > Fixes: 4864b0702653 ("objtool, perf: Fix GCC 8 -Wrestrict error") > > > CC: Josh Poimboeuf > > > Signed-off-by: kbuild test robot > > > --- > > > > > > tree: https://android.googlesource.com/kernel/common android-4.9-o-mr1 > > > head: 58ce54880a03d9c27327434ba15281f5a7139671 > > > commit: 4864b070265301ba88506ee407d51e058dcb0ad6 [42/51] objtool, perf: Fix GCC 8 -Wrestrict error > > > :::::: branch date: 27 hours ago > > > :::::: commit date: 9 weeks ago > > > > > > Please take the patch only if it's a positive warning. Thanks! > > > > > > rawmidi.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > --- a/sound/core/rawmidi.c > > > +++ b/sound/core/rawmidi.c > > > @@ -373,7 +373,7 @@ static int snd_rawmidi_open(struct inode > > > if ((file->f_flags & O_APPEND) && !(file->f_flags & O_NONBLOCK)) > > > return -EINVAL; /* invalid combination */ > > > > > > - err = nonseekable_open(inode, file); > > > + err = stream_open(inode, file); > > > if (err < 0) > > > return err; > > > > Strange, sound/core/rawmidi.c was aleady converted to stream_open by my > > commmit c5bf68fe0c86 (*: convert stream-like files from nonseekable_open > > -> stream_open). I also don't have commit 4864b0702653 in my tree (see > > "Fixes: ..." above) even though I just pulled from linus and next. The > > same story applies to other 2 patches as well. > > > > Ok, I just checked the android tree ("tree: ..." referenced above) and > > commit 4864b0702653 is there, but it has nothing to do with > > nonseekable_open at all (it touches just tools/lib/str_error_r.c). > > > > In any way, all 3 patches should be safe to apply, but they are the > > least intresting bits of stream_open conversion as other changes from > > c5bf68fe0c86 deal with several real deadlocks (and event not all of them > > are marked as errors in that patch), and also there is bbd84f33 (fuse: > > Add FOPEN_STREAM to use stream_open()) which fixes FUSE deadlock > > regression visible to userspace. > > > > I'm also not sure to where to forward the patches if I wanted to do so. > > You can forward them to the people listed in the message: > > > > CC: kbuild-all(a)lists.01.org > > > CC: Guenter Roeck > > > BCC: philip.li(a)intel.com > > > TO: cros-kernel-buildreports(a)googlegroups.com > > julia > > > > > > Kirill > > > > > > On Fri, Jan 10, 2020 at 01:47:13PM +0100, Julia Lawall wrote: > > > This one too... > > > > > > ---------- Forwarded message ---------- > > > Date: Thu, 9 Jan 2020 07:00:41 +0800 > > > From: kbuild test robot > > > To: kbuild(a)lists.01.org > > > Cc: Julia Lawall , > > > Elena Reshetova > > > Subject: [PATCH] objtool, perf: fix stream_open.cocci warnings > > > > > > CC: kbuild-all(a)lists.01.org > > > CC: Guenter Roeck > > > BCC: philip.li(a)intel.com > > > TO: cros-kernel-buildreports(a)googlegroups.com > > > > > > From: kbuild test robot > > > > > > sound/core/control.c:55:7-23: WARNING: snd_ctl_f_ops: .read() has stream semantic; safe to change nonseekable_open -> stream_open. > > > > > > Generated by: scripts/coccinelle/api/stream_open.cocci > > > > > > Fixes: 4864b0702653 ("objtool, perf: Fix GCC 8 -Wrestrict error") > > > CC: Josh Poimboeuf > > > Signed-off-by: kbuild test robot > > > --- > > > > > > tree: https://android.googlesource.com/kernel/common android-4.9-o-mr1 > > > head: 58ce54880a03d9c27327434ba15281f5a7139671 > > > commit: 4864b070265301ba88506ee407d51e058dcb0ad6 [42/51] objtool, perf: Fix GCC 8 -Wrestrict error > > > :::::: branch date: 27 hours ago > > > :::::: commit date: 9 weeks ago > > > > > > Please take the patch only if it's a positive warning. Thanks! > > > > > > control.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > --- a/sound/core/control.c > > > +++ b/sound/core/control.c > > > @@ -52,7 +52,7 @@ static int snd_ctl_open(struct inode *in > > > struct snd_ctl_file *ctl; > > > int i, err; > > > > > > - err = nonseekable_open(inode, file); > > > + err = stream_open(inode, file); > > > if (err < 0) > > > return err; > > > > > > > On Fri, Jan 10, 2020 at 01:47:25PM +0100, Julia Lawall wrote: > > > And this one. > > > > > > ---------- Forwarded message ---------- > > > Date: Thu, 9 Jan 2020 07:00:42 +0800 > > > From: kbuild test robot > > > To: kbuild(a)lists.01.org > > > Cc: Julia Lawall , > > > Elena Reshetova > > > Subject: [PATCH] objtool, perf: fix stream_open.cocci warnings > > > > > > CC: kbuild-all(a)lists.01.org > > > CC: Guenter Roeck > > > BCC: philip.li(a)intel.com > > > TO: cros-kernel-buildreports(a)googlegroups.com > > > > > > From: kbuild test robot > > > > > > sound/core/seq/seq_clientmgr.c:309:7-23: WARNING: snd_seq_f_ops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open. > > > > > > Generated by: scripts/coccinelle/api/stream_open.cocci > > > > > > Fixes: 4864b0702653 ("objtool, perf: Fix GCC 8 -Wrestrict error") > > > CC: Josh Poimboeuf > > > Signed-off-by: kbuild test robot > > > --- > > > > > > tree: https://android.googlesource.com/kernel/common android-4.9-o-mr1 > > > head: 58ce54880a03d9c27327434ba15281f5a7139671 > > > commit: 4864b070265301ba88506ee407d51e058dcb0ad6 [42/51] objtool, perf: Fix GCC 8 -Wrestrict error > > > :::::: branch date: 27 hours ago > > > :::::: commit date: 9 weeks ago > > > > > > Please take the patch only if it's a positive warning. Thanks! > > > > > > seq_clientmgr.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > --- a/sound/core/seq/seq_clientmgr.c > > > +++ b/sound/core/seq/seq_clientmgr.c > > > @@ -306,7 +306,7 @@ static int snd_seq_open(struct inode *in > > > struct snd_seq_user_client *user; > > > int err; > > > > > > - err = nonseekable_open(inode, file); > > > + err = stream_open(inode, file); > > > if (err < 0) > > > return err;