From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, T_DKIMWL_WL_HIGH,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9BAEAC072B5 for ; Fri, 24 May 2019 19:22:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6F02C217F9 for ; Fri, 24 May 2019 19:22:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558725765; bh=H/vu/ripB+rpgOhp9/XQ/T37Rii1mGmYFD7QLp828pQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=2CeHBft8aiy/iVDGnctuhsNZFJ9H1PYm9xHg0pvbs6nVABXan4o/2Ul++/QawWtYI vPP7gpXjZQUk+LYycyP/DQOOU9MwIHZBFqriF1rprrMmdgK1xn+vzSls048IzQyWLg YeCh9Jo5USa0IjAQ6VAK12TADBsZ4J6I8YT7QmgY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729597AbfEXTWp (ORCPT ); Fri, 24 May 2019 15:22:45 -0400 Received: from casper.infradead.org ([85.118.1.10]:58716 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729017AbfEXTWo (ORCPT ); Fri, 24 May 2019 15:22:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=hoNOqHXo5AF7rmfT5cvaQvenH+apZ2meHqOG+V3ZTk8=; b=E86AzCtYqiDp3qSRnyOcJxBUTU vLpqV7407uJ4AdhCn1z5EfLh3tObrEVmJjnZsnMrBsHLO+ZbdM3iwGNX3WOB5Iudz4EupNvksGr3/ zZxY1CG2ZpApI7OpV+uidLOmHqSGgaAsUYvaQuEIVlmvGHXluypmMxS8qa+ZqzUOYJJdVdK3QPcJZ rGv/UWqFYP7f2Cwef/ubW+T6IQR+aR2twpLeQH289qPmPjpDNx4y5JhaT+aW/h0Nuiy+afVFI28w6 C/+eZXA5a912M4hz0OA7kJZO92UYfElWyf8VuXgSTiqxA/tEXDVz4tgFgssP5Mr7ol/hlawXlXZzf 7xPpyOFA==; Received: from 177.97.63.247.dynamic.adsl.gvt.net.br ([177.97.63.247] helo=coco.lan) by casper.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hUFlx-0006cw-4N; Fri, 24 May 2019 19:22:33 +0000 Date: Fri, 24 May 2019 16:22:26 -0300 From: Mauro Carvalho Chehab To: Greg Kroah-Hartman Cc: Alan Stern , Allison Randal , Steve Winslow , Wen Yang , Thomas Gleixner , stable@vger.kernel.org Subject: Re: [PATCH v2] media: smsusb: better handle optional alignment Message-ID: <20190524162226.2aa3df9c@coco.lan> In-Reply-To: <20190524190941.GA18849@kroah.com> References: <20190524190941.GA18849@kroah.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org Em Fri, 24 May 2019 21:09:41 +0200 Greg Kroah-Hartman 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: > > Signed-off-by: Mauro Carvalho Chehab > > --- > > > > 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