Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9221035pxu; Mon, 28 Dec 2020 09:39:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJwL/XhaWyj/WDIYChBW8B7+AFEHXaYbN5PiHv9Zj8eSdW1GurZo3U8ZrNbuFc+81wWpK3m4 X-Received: by 2002:a17:906:1194:: with SMTP id n20mr41837137eja.269.1609177161940; Mon, 28 Dec 2020 09:39:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609177161; cv=none; d=google.com; s=arc-20160816; b=wACHikNo/ywXAZ+uA/AzE6eyEWKxtsKWHSxSoP4MTyCYFT46WaKxLocrttrE8bXjGD 99Vqb/OpsPTY9C0lCmPnlrbCZ4LBOsuer7P5lp4jeizPxv5Zq2EW2b5Cgs0BrPbyCDjz E6WZeGv9fzygJPEWJL73+s+9hDhVoYolGVk5/34QOBLxR2rAC5y2cqpSMas9sUymacuI INCv3oaFbU9gL+ClUuyGNTHOog6PHHaIDZS8w3OFnmEgfvrzGSx61IStV3rKxrg9cYC/ cqOXOytxcLHD8+7kbxcG5hnUZmLgg32xEM8yHAoQluAPLek9ME6PwmI3Syt4IY7yMwjG O0NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pSjc1kVfU8/WxLBVTNMhdXujWeNrygnjk30ne1RCEcg=; b=Ov92gqa+u1COUkmtUGmGwqgsquRU+EZfzFpypgsL6UUMyS4xZi3SzTz+dPcvSx7nSS w8oDXq3syRKiLcs2JyV7+oHznZtUAEPSk7FQV2Fhj3gN1FJFPiTRXjqe3A0oipe9yrWp STuK4+XoSA/mls1cuKqOKPEc1XHkJLEYVQ5YOR6NUcfthec0kY/TzJIZDN0K311lieyN 2fKL45DFEr3g1TRTIeiEDrKdPYM+kP1NfVVVfHtCdJ9NwobUeuoBkH7E3eKjcuQckNRT LUNSiLaNhmC4Hn+WJX4PMFoYr2UjhqqgLHdBZduzEG7giBi56RYoSCYO60QMenp+uc2J 09KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tWNvXQkb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qu25si19013328ejb.146.2020.12.28.09.38.59; Mon, 28 Dec 2020 09:39:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tWNvXQkb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731285AbgL1NKD (ORCPT + 99 others); Mon, 28 Dec 2020 08:10:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:37532 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731268AbgL1NKB (ORCPT ); Mon, 28 Dec 2020 08:10:01 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id F2BBD2076D; Mon, 28 Dec 2020 13:09:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609160985; bh=32N3iBa7n5TJdAl+gIU8U6PfxFqNxfabR2e5sxFeG04=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tWNvXQkb1CWulN4nuGmwAunYPIZnZPlTvKIWCzteUy6L2cU9la3Wbv8gLbX/9W4Ac l+vTWPA1vtq1m9WDH/eQipAxy6SxWLs7yiXs69mjcQkDqGu1y7O7mOrGM/T7uZtWj0 vZL3sMXXQaLaByOKF4CJa6bC+TKjIwa8p3iGS9K8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Antti Palosaari , Mauro Carvalho Chehab , syzbot+c60ddb60b685777d9d59@syzkaller.appspotmail.com Subject: [PATCH 4.14 061/242] media: msi2500: assign SPI bus number dynamically Date: Mon, 28 Dec 2020 13:47:46 +0100 Message-Id: <20201228124907.683677510@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Antti Palosaari commit 9c60cc797cf72e95bb39f32316e9f0e5f85435f9 upstream. SPI bus number must be assigned dynamically for each device, otherwise it will crash when multiple devices are plugged to system. Reported-and-tested-by: syzbot+c60ddb60b685777d9d59@syzkaller.appspotmail.com Cc: stable@vger.kernel.org Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/media/usb/msi2500/msi2500.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/media/usb/msi2500/msi2500.c +++ b/drivers/media/usb/msi2500/msi2500.c @@ -1250,7 +1250,7 @@ static int msi2500_probe(struct usb_inte } dev->master = master; - master->bus_num = 0; + master->bus_num = -1; master->num_chipselect = 1; master->transfer_one_message = msi2500_transfer_one_message; spi_master_set_devdata(master, dev);