LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Sean Young <sean@mess.org>
To: Pavel Skripkin <paskripkin@gmail.com>
Cc: mkrufky@linuxtv.org, mchehab@kernel.org, crope@iki.fi,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	syzbot+5ca0bf339f13c4243001@syzkaller.appspotmail.com
Subject: Re: [PATCH v3] media: mxl111sf: change mutex_init() location
Date: Wed, 15 Sep 2021 17:40:01 +0100	[thread overview]
Message-ID: <20210915164001.GA18319@gofer.mess.org> (raw)
In-Reply-To: <c1c0d250-afa1-254e-421a-d35790688c60@gmail.com>

On Sun, Sep 12, 2021 at 06:49:52PM +0300, Pavel Skripkin wrote:
> On 8/19/21 13:42, Pavel Skripkin wrote:
> > Syzbot reported, that mxl111sf_ctrl_msg() uses uninitialized
> > mutex. The problem was in wrong mutex_init() location.
> > 
> > Previous mutex_init(&state->msg_lock) call was in ->init() function, but
> > dvb_usbv2_init() has this order of calls:
> > 
> > 	dvb_usbv2_init()
> > 	  dvb_usbv2_adapter_init()
> > 	    dvb_usbv2_adapter_frontend_init()
> > 	      props->frontend_attach()
> > 
> > 	  props->init()
> > 
> > Since mxl111sf_* devices call mxl111sf_ctrl_msg() in ->frontend_attach()
> > internally we need to initialize state->msg_lock before
> > frontend_attach(). To achieve it, ->probe() call added to all mxl111sf_*
> > devices, which will simply initiaize mutex.
> > 
> > Reported-and-tested-by: syzbot+5ca0bf339f13c4243001@syzkaller.appspotmail.com
> > Fixes: 8572211842af ("[media] mxl111sf: convert to new DVB USB")
> > Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
> 
> Hi, Sean!
> 
> Did you have a chance to review this patch? Thank you :)

Sorry during the merge window (from -rc6 to -rc1) I don't tend to look
at patches. Looks good to me, I'll merge it.

Thanks

Sean

      reply	other threads:[~2021-09-15 16:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-30 21:38 [PATCH] " Pavel Skripkin
2021-08-15  8:37 ` Sean Young
2021-08-15  8:49   ` Pavel Skripkin
2021-08-15  9:06     ` Pavel Skripkin
2021-08-19  9:29       ` Sean Young
2021-08-19  9:31         ` Pavel Skripkin
2021-08-19 10:38         ` [PATCH v2] " Pavel Skripkin
2021-08-19 10:42           ` [PATCH v3] " Pavel Skripkin
2021-09-12 15:49             ` Pavel Skripkin
2021-09-15 16:40               ` Sean Young [this message]

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=20210915164001.GA18319@gofer.mess.org \
    --to=sean@mess.org \
    --cc=crope@iki.fi \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=mkrufky@linuxtv.org \
    --cc=paskripkin@gmail.com \
    --cc=syzbot+5ca0bf339f13c4243001@syzkaller.appspotmail.com \
    --subject='Re: [PATCH v3] media: mxl111sf: change mutex_init() location' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).