From: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Alan Stern <stern@rowland.harvard.edu>,
Allison Randal <allison@lohutok.net>,
Steve Winslow <swinslow@gmail.com>,
Wen Yang <wen.yang99@zte.com.cn>,
Thomas Gleixner <tglx@linutronix.de>,
stable@vger.kernel.org
Subject: Re: [PATCH v2] media: smsusb: better handle optional alignment
Date: Fri, 24 May 2019 16:22:26 -0300 [thread overview]
Message-ID: <20190524162226.2aa3df9c@coco.lan> (raw)
In-Reply-To: <20190524190941.GA18849@kroah.com>
Em Fri, 24 May 2019 21:09:41 +0200
Greg Kroah-Hartman <gregkh@linuxfoundation.org> escreveu:
> On Fri, May 24, 2019 at 10:59:43AM -0400, Mauro Carvalho Chehab wrote:
> > Most Siano devices require an alignment for the response.
> >
> > Changeset f3be52b0056a ("media: usb: siano: Fix general protection fault in smsusb")
> > changed the logic with gets such aligment, but it now produces a
> > sparce warning:
> >
> > drivers/media/usb/siano/smsusb.c: In function 'smsusb_init_device':
> > drivers/media/usb/siano/smsusb.c:447:37: warning: 'in_maxp' may be used uninitialized in this function [-Wmaybe-uninitialized]
> > 447 | dev->response_alignment = in_maxp - sizeof(struct sms_msg_hdr);
> > | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> > The sparse message itself is bogus, but a broken (or fake) USB
> > eeprom could produce a negative value for response_alignment.
> >
> > So, change the code in order to check if the result is not
> > negative.
> >
> > Fixes: f3be52b0056a ("media: usb: siano: Fix general protection fault in smsusb")
> > CC: <stable@vger.kernel.org>
> > Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
> > ---
> >
> > Greg,
> >
> > As the Alan patches went via your tree, please apply this one too.
>
> Thanks, now done, and I fixed up the Fixes: sha1 tag to match my tree.
Ah, thanks! I forgot about that :-)
>
> greg k-h
Thanks,
Mauro
prev parent reply other threads:[~2019-05-24 19:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-24 14:59 [PATCH v2] media: smsusb: better handle optional alignment Mauro Carvalho Chehab
2019-05-24 19:09 ` Greg Kroah-Hartman
2019-05-24 19:22 ` Mauro Carvalho Chehab [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=20190524162226.2aa3df9c@coco.lan \
--to=mchehab+samsung@kernel.org \
--cc=allison@lohutok.net \
--cc=gregkh@linuxfoundation.org \
--cc=stable@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=swinslow@gmail.com \
--cc=tglx@linutronix.de \
--cc=wen.yang99@zte.com.cn \
/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.