All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kirill Smelkov <kirr@nexedi.com>
To: kbuild-all@lists.01.org
Subject: Fwd: [PATCH] objtool, perf: fix stream_open.cocci warnings
Date: Mon, 13 Jan 2020 18:04:44 +0000	[thread overview]
Message-ID: <20200113180436.GA11195@deco.navytux.spb.ru> (raw)
In-Reply-To: <alpine.DEB.2.21.2001131717230.4078@hadrien>

[-- Attachment #1: Type: text/plain, Size: 12045 bytes --]

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 <lkp@intel.com>
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 <lkp@intel.com>
Signed-off-by: Kirill Smelkov <kirr@nexedi.com>
---

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 <lkp@intel.com>
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 <lkp@intel.com>
Signed-off-by: Kirill Smelkov <kirr@nexedi.com>
---

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 <lkp@intel.com>
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 <lkp@intel.com>
Signed-off-by: Kirill Smelkov <kirr@nexedi.com>
---

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 <lkp@intel.com>
> > > To: kbuild(a)lists.01.org
> > > Cc: Julia Lawall <julia.lawall@lip6.fr>,
> > >     Elena Reshetova <elena.reshetova@intel.com>
> > > Subject: [PATCH] objtool, perf: fix stream_open.cocci warnings
> > >
> > > CC: kbuild-all(a)lists.01.org
> > > CC: Guenter Roeck <groeck@google.com>
> > > BCC: philip.li(a)intel.com
> > > TO: cros-kernel-buildreports(a)googlegroups.com
> > >
> > > From: kbuild test robot <lkp@intel.com>
> > >
> > > 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 <jpoimboe@redhat.com>
> > > Signed-off-by: kbuild test robot <lkp@intel.com>
> > > ---
> > >
> > > 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 <groeck@google.com>
> > > 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 <lkp@intel.com>
> > > To: kbuild(a)lists.01.org
> > > Cc: Julia Lawall <julia.lawall@lip6.fr>,
> > >     Elena Reshetova <elena.reshetova@intel.com>
> > > Subject: [PATCH] objtool, perf: fix stream_open.cocci warnings
> > >
> > > CC: kbuild-all(a)lists.01.org
> > > CC: Guenter Roeck <groeck@google.com>
> > > BCC: philip.li(a)intel.com
> > > TO: cros-kernel-buildreports(a)googlegroups.com
> > >
> > > From: kbuild test robot <lkp@intel.com>
> > >
> > > 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 <jpoimboe@redhat.com>
> > > Signed-off-by: kbuild test robot <lkp@intel.com>
> > > ---
> > >
> > > 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 <lkp@intel.com>
> > > To: kbuild(a)lists.01.org
> > > Cc: Julia Lawall <julia.lawall@lip6.fr>,
> > >     Elena Reshetova <elena.reshetova@intel.com>
> > > Subject: [PATCH] objtool, perf: fix stream_open.cocci warnings
> > >
> > > CC: kbuild-all(a)lists.01.org
> > > CC: Guenter Roeck <groeck@google.com>
> > > BCC: philip.li(a)intel.com
> > > TO: cros-kernel-buildreports(a)googlegroups.com
> > >
> > > From: kbuild test robot <lkp@intel.com>
> > >
> > > 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 <jpoimboe@redhat.com>
> > > Signed-off-by: kbuild test robot <lkp@intel.com>
> > > ---
> > >
> > > 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;

       reply	other threads:[~2020-01-13 18:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <alpine.DEB.2.21.2001131717230.4078@hadrien>
2020-01-13 18:04 ` Kirill Smelkov [this message]
2020-01-13 18:21   ` Fwd: [PATCH] objtool, perf: fix stream_open.cocci warnings Greg Kroah-Hartman
2020-01-13 18:32     ` Todd Kjos
2020-01-13 18:52       ` Kirill Smelkov
2020-01-13 18:56         ` Todd Kjos
2020-01-13 23:08           ` Li, Philip
2020-01-13 23:15             ` Guenter Roeck
2020-01-13 23:18               ` Li, Philip
2020-01-13 23:27                 ` Guenter Roeck
2020-01-13 21:48         ` Julia Lawall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200113180436.GA11195@deco.navytux.spb.ru \
    --to=kirr@nexedi.com \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.