diff mbox series

media: pvrusb2: use a different format for warnings

Message ID b3761c6479a49b60316325ebc22da904e36d4538.1556813333.git.andreyknvl@google.com (mailing list archive)
State New, archived
Headers show
Series media: pvrusb2: use a different format for warnings | expand

Commit Message

Andrey Konovalov May 2, 2019, 4:09 p.m. UTC
When the pvrusb2 driver detects that there's something wrong with the
device, it prints a warning message. Right now those message are
printed in two different formats:

1. ***WARNING*** message here
2. WARNING: message here

There's an issue with the second format. Syzkaller recognizes it as a
message produced by a WARN_ON(), which is used to indicate a bug in the
kernel. However pvrusb2 prints those warnings to indicate an issue with
the device, not the bug in the kernel.

This patch changes the pvrusb2 driver to consistently use the first
warning message format. This will unblock syzkaller testing of this
driver.

Reported-by: syzbot+af8f8d2ac0d39b0ed3a0@syzkaller.appspotmail.com
Reported-by: syzbot+170a86bf206dd2c6217e@syzkaller.appspotmail.com
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
---
 drivers/media/usb/pvrusb2/pvrusb2-hdw.c      | 4 ++--
 drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c | 6 +++---
 drivers/media/usb/pvrusb2/pvrusb2-std.c      | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

Comments

Greg Kroah-Hartman May 2, 2019, 4:39 p.m. UTC | #1
On Thu, May 02, 2019 at 06:09:26PM +0200, Andrey Konovalov wrote:
> When the pvrusb2 driver detects that there's something wrong with the
> device, it prints a warning message. Right now those message are
> printed in two different formats:
> 
> 1. ***WARNING*** message here
> 2. WARNING: message here
> 
> There's an issue with the second format. Syzkaller recognizes it as a
> message produced by a WARN_ON(), which is used to indicate a bug in the
> kernel. However pvrusb2 prints those warnings to indicate an issue with
> the device, not the bug in the kernel.
> 
> This patch changes the pvrusb2 driver to consistently use the first
> warning message format. This will unblock syzkaller testing of this
> driver.
> 
> Reported-by: syzbot+af8f8d2ac0d39b0ed3a0@syzkaller.appspotmail.com
> Reported-by: syzbot+170a86bf206dd2c6217e@syzkaller.appspotmail.com
> Signed-off-by: Andrey Konovalov <andreyknvl@google.com>

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andrey Konovalov June 19, 2019, 2:30 p.m. UTC | #2
On Thu, May 2, 2019 at 6:39 PM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> On Thu, May 02, 2019 at 06:09:26PM +0200, Andrey Konovalov wrote:
> > When the pvrusb2 driver detects that there's something wrong with the
> > device, it prints a warning message. Right now those message are
> > printed in two different formats:
> >
> > 1. ***WARNING*** message here
> > 2. WARNING: message here
> >
> > There's an issue with the second format. Syzkaller recognizes it as a
> > message produced by a WARN_ON(), which is used to indicate a bug in the
> > kernel. However pvrusb2 prints those warnings to indicate an issue with
> > the device, not the bug in the kernel.
> >
> > This patch changes the pvrusb2 driver to consistently use the first
> > warning message format. This will unblock syzkaller testing of this
> > driver.
> >
> > Reported-by: syzbot+af8f8d2ac0d39b0ed3a0@syzkaller.appspotmail.com
> > Reported-by: syzbot+170a86bf206dd2c6217e@syzkaller.appspotmail.com
> > Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
>
> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

I don't think I see this patch picked up anywhere. Should this fix go
through the USB or some media tree?
Andrey Konovalov June 19, 2019, 2:31 p.m. UTC | #3
On Wed, Jun 19, 2019 at 4:30 PM Andrey Konovalov <andreyknvl@google.com> wrote:
>
> On Thu, May 2, 2019 at 6:39 PM Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> >
> > On Thu, May 02, 2019 at 06:09:26PM +0200, Andrey Konovalov wrote:
> > > When the pvrusb2 driver detects that there's something wrong with the
> > > device, it prints a warning message. Right now those message are
> > > printed in two different formats:
> > >
> > > 1. ***WARNING*** message here
> > > 2. WARNING: message here
> > >
> > > There's an issue with the second format. Syzkaller recognizes it as a
> > > message produced by a WARN_ON(), which is used to indicate a bug in the
> > > kernel. However pvrusb2 prints those warnings to indicate an issue with
> > > the device, not the bug in the kernel.
> > >
> > > This patch changes the pvrusb2 driver to consistently use the first
> > > warning message format. This will unblock syzkaller testing of this
> > > driver.
> > >
> > > Reported-by: syzbot+af8f8d2ac0d39b0ed3a0@syzkaller.appspotmail.com
> > > Reported-by: syzbot+170a86bf206dd2c6217e@syzkaller.appspotmail.com
> > > Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
> >
> > Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>
> I don't think I see this patch picked up anywhere. Should this fix go
> through the USB or some media tree?

Ah, found something here:
https://www.spinics.net/lists/linux-media/msg151398.html

I guess it'll go in with 5.3.
Mauro Carvalho Chehab June 19, 2019, 2:44 p.m. UTC | #4
Em Wed, 19 Jun 2019 16:30:01 +0200
Andrey Konovalov <andreyknvl@google.com> escreveu:

> On Thu, May 2, 2019 at 6:39 PM Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> >
> > On Thu, May 02, 2019 at 06:09:26PM +0200, Andrey Konovalov wrote:  
> > > When the pvrusb2 driver detects that there's something wrong with the
> > > device, it prints a warning message. Right now those message are
> > > printed in two different formats:
> > >
> > > 1. ***WARNING*** message here
> > > 2. WARNING: message here
> > >
> > > There's an issue with the second format. Syzkaller recognizes it as a
> > > message produced by a WARN_ON(), which is used to indicate a bug in the
> > > kernel. However pvrusb2 prints those warnings to indicate an issue with
> > > the device, not the bug in the kernel.
> > >
> > > This patch changes the pvrusb2 driver to consistently use the first
> > > warning message format. This will unblock syzkaller testing of this
> > > driver.
> > >
> > > Reported-by: syzbot+af8f8d2ac0d39b0ed3a0@syzkaller.appspotmail.com
> > > Reported-by: syzbot+170a86bf206dd2c6217e@syzkaller.appspotmail.com
> > > Signed-off-by: Andrey Konovalov <andreyknvl@google.com>  
> >
> > Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>  
> 
> I don't think I see this patch picked up anywhere. Should this fix go
> through the USB or some media tree?

Media drivers go via the media tree. You should notice that we are
currently receiving around 100 patches per week there. It may take
some time for people to review, but the patches are queued at
patchwork, so sooner or later someone will review and apply, if nobody
did it already:

	https://patchwork.linuxtv.org/project/linux-media/list/

That's said, I'm not seeing this patch there:

	https://patchwork.linuxtv.org/project/linux-media/list/?series=&submitter=&state=*&q=pvrusb2&archive=&delegate=

It sounds that, for whatever reason, the patch never arrived
patchwork. Please re-submit it and check if media patchwork got it.

If not, perhaps you just found a bug with patchwork 2.1 :-)
(we upgraded from version 1.0 to 2.1 at the beginning of this
month)
Thanks,
Mauro
Andrey Konovalov June 19, 2019, 3:24 p.m. UTC | #5
On Wed, Jun 19, 2019 at 4:45 PM Mauro Carvalho Chehab
<mchehab@kernel.org> wrote:
>
> Em Wed, 19 Jun 2019 16:30:01 +0200
> Andrey Konovalov <andreyknvl@google.com> escreveu:
>
> > On Thu, May 2, 2019 at 6:39 PM Greg Kroah-Hartman
> > <gregkh@linuxfoundation.org> wrote:
> > >
> > > On Thu, May 02, 2019 at 06:09:26PM +0200, Andrey Konovalov wrote:
> > > > When the pvrusb2 driver detects that there's something wrong with the
> > > > device, it prints a warning message. Right now those message are
> > > > printed in two different formats:
> > > >
> > > > 1. ***WARNING*** message here
> > > > 2. WARNING: message here
> > > >
> > > > There's an issue with the second format. Syzkaller recognizes it as a
> > > > message produced by a WARN_ON(), which is used to indicate a bug in the
> > > > kernel. However pvrusb2 prints those warnings to indicate an issue with
> > > > the device, not the bug in the kernel.
> > > >
> > > > This patch changes the pvrusb2 driver to consistently use the first
> > > > warning message format. This will unblock syzkaller testing of this
> > > > driver.
> > > >
> > > > Reported-by: syzbot+af8f8d2ac0d39b0ed3a0@syzkaller.appspotmail.com
> > > > Reported-by: syzbot+170a86bf206dd2c6217e@syzkaller.appspotmail.com
> > > > Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
> > >
> > > Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >
> > I don't think I see this patch picked up anywhere. Should this fix go
> > through the USB or some media tree?
>
> Media drivers go via the media tree. You should notice that we are
> currently receiving around 100 patches per week there. It may take
> some time for people to review, but the patches are queued at
> patchwork, so sooner or later someone will review and apply, if nobody
> did it already:
>
>         https://patchwork.linuxtv.org/project/linux-media/list/
>
> That's said, I'm not seeing this patch there:
>
>         https://patchwork.linuxtv.org/project/linux-media/list/?series=&submitter=&state=*&q=pvrusb2&archive=&delegate=
>
> It sounds that, for whatever reason, the patch never arrived
> patchwork. Please re-submit it and check if media patchwork got it.

OK, done!

>
> If not, perhaps you just found a bug with patchwork 2.1 :-)
> (we upgraded from version 1.0 to 2.1 at the beginning of this
> month)
> Thanks,
> Mauro
diff mbox series

Patch

diff --git a/drivers/media/usb/pvrusb2/pvrusb2-hdw.c b/drivers/media/usb/pvrusb2/pvrusb2-hdw.c
index 446a999dd2ce..a0f7b10045d2 100644
--- a/drivers/media/usb/pvrusb2/pvrusb2-hdw.c
+++ b/drivers/media/usb/pvrusb2/pvrusb2-hdw.c
@@ -1678,7 +1678,7 @@  static int pvr2_decoder_enable(struct pvr2_hdw *hdw,int enablefl)
 	}
 	if (!hdw->flag_decoder_missed) {
 		pvr2_trace(PVR2_TRACE_ERROR_LEGS,
-			   "WARNING: No decoder present");
+			   "***WARNING*** No decoder present");
 		hdw->flag_decoder_missed = !0;
 		trace_stbit("flag_decoder_missed",
 			    hdw->flag_decoder_missed);
@@ -2364,7 +2364,7 @@  struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf,
 	if (hdw_desc->flag_is_experimental) {
 		pvr2_trace(PVR2_TRACE_INFO, "**********");
 		pvr2_trace(PVR2_TRACE_INFO,
-			   "WARNING: Support for this device (%s) is experimental.",
+			   "***WARNING*** Support for this device (%s) is experimental.",
 							      hdw_desc->description);
 		pvr2_trace(PVR2_TRACE_INFO,
 			   "Important functionality might not be entirely working.");
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c b/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c
index 8f023085c2d9..43e54bdbd4aa 100644
--- a/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c
+++ b/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c
@@ -343,11 +343,11 @@  static int i2c_hack_cx25840(struct pvr2_hdw *hdw,
 
 	if ((ret != 0) || (*rdata == 0x04) || (*rdata == 0x0a)) {
 		pvr2_trace(PVR2_TRACE_ERROR_LEGS,
-			   "WARNING: Detected a wedged cx25840 chip; the device will not work.");
+			   "***WARNING*** Detected a wedged cx25840 chip; the device will not work.");
 		pvr2_trace(PVR2_TRACE_ERROR_LEGS,
-			   "WARNING: Try power cycling the pvrusb2 device.");
+			   "***WARNING*** Try power cycling the pvrusb2 device.");
 		pvr2_trace(PVR2_TRACE_ERROR_LEGS,
-			   "WARNING: Disabling further access to the device to prevent other foul-ups.");
+			   "***WARNING*** Disabling further access to the device to prevent other foul-ups.");
 		// This blocks all further communication with the part.
 		hdw->i2c_func[0x44] = NULL;
 		pvr2_hdw_render_useless(hdw);
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-std.c b/drivers/media/usb/pvrusb2/pvrusb2-std.c
index 6b651f8b54df..37dc299a1ca2 100644
--- a/drivers/media/usb/pvrusb2/pvrusb2-std.c
+++ b/drivers/media/usb/pvrusb2/pvrusb2-std.c
@@ -353,7 +353,7 @@  struct v4l2_standard *pvr2_std_create_enum(unsigned int *countptr,
 		bcnt = pvr2_std_id_to_str(buf,sizeof(buf),fmsk);
 		pvr2_trace(
 			PVR2_TRACE_ERROR_LEGS,
-			"WARNING: Failed to classify the following standard(s): %.*s",
+			"***WARNING*** Failed to classify the following standard(s): %.*s",
 			bcnt,buf);
 	}