From nobody Fri Dec 19 00:21:59 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C08E826A0AB; Tue, 25 Mar 2025 22:10:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742940602; cv=none; b=JGpfo8KmsCUv+If+7kxELwHZNL4WShc0j12zJoYKc3mHiSC89Zqnm/0jO1Y5epP3b7pwC+cG3KeUQwaDg6RDywxvvp9YiC3aQJNcZMmkte+zoPZ0dPUWIxUDGkmuS7zL5LSIBnH3SvN5lP5yfQS+Nsagraemi1D4kkaLBGqocxM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742940602; c=relaxed/simple; bh=4ggJCstmwH6Cdni3A3VO6B6X4BXLiV2WN5DyoINioSQ=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=rm88+gEUzSzjj0nbwTq3vOA4s3aWCevzCr1UTN/LyI6VueWAhwvTKZSci8NvLW1lDs9UL3q0BU6Cx3Pz6X0Hfj8M6T3ezkDJ9CpCfJqdeQGTaII1boVXgRcFk59htQ65NDKKzyY8umIbw11E3D97/dwzATfWKc9NVEdEHlc3PFk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ZzDQgR1Q; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=DgwcAzTb; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ZzDQgR1Q"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="DgwcAzTb" Date: Tue, 25 Mar 2025 22:09:58 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1742940599; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AiMXXCg6I4OOYOlo8IN91poZlEAVBRheGjYj/76Gcw0=; b=ZzDQgR1Qpijti7sF1hBTQne02jGipvDwoF5IyoDhh3OeVSa6SU+83RxNz2fW8imP1u/lS3 JzLSPGocQpbQjwq037qfjXzcYp787e2V56xL76ry4Ead5dPh0dT0Tn0l8qaCbyUf5ux9TH yWAjeO1W49D8Iq/hooFd8pUm9PRcdmienE/Nxy/2CfJlNmVYqwqK1hXuwto5HR3yUDWRPO W3reUtQKE1EgThNoweDQBou++d4r6v37KtAUj0nglx+90wBmmQw4kkIYK4M231T4xVFZ0T oHeAgySgue/DaUR94ip/cpXLZd22/aWVVXqhmOlg1al6N8FQpePIvsrTbttyAw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1742940599; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AiMXXCg6I4OOYOlo8IN91poZlEAVBRheGjYj/76Gcw0=; b=DgwcAzTb1CZbEyk1+zangTRqhBSXS3hHlaWbhvK8KtGqSw6gfsMVovVv3FO64/IdFSvlvm jqMogNMZ8xYGStAw== From: "tip-bot2 for Josh Poimboeuf" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: objtool/urgent] objtool, media: dib8000: Prevent divide-by-zero in dib8000_set_dds() Cc: kernel test robot , Josh Poimboeuf , Ingo Molnar , Mauro Carvalho Chehab , Linus Torvalds , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <174294059839.14745.12160091729171456650.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the objtool/urgent branch of tip: Commit-ID: e63d465f59011dede0a0f1d21718b59a64c3ff5c Gitweb: https://git.kernel.org/tip/e63d465f59011dede0a0f1d21718b59a6= 4c3ff5c Author: Josh Poimboeuf AuthorDate: Mon, 24 Mar 2025 14:56:06 -07:00 Committer: Ingo Molnar CommitterDate: Tue, 25 Mar 2025 23:00:15 +01:00 objtool, media: dib8000: Prevent divide-by-zero in dib8000_set_dds() If dib8000_set_dds()'s call to dib8000_read32() returns zero, the result is a divide-by-zero. Prevent that from happening. Fixes the following warning with an UBSAN kernel: drivers/media/dvb-frontends/dib8000.o: warning: objtool: dib8000_tune() f= alls through to next function dib8096p_cfg_DibRx() Fixes: 173a64cb3fcf ("[media] dib8000: enhancement") Reported-by: kernel test robot Signed-off-by: Josh Poimboeuf Signed-off-by: Ingo Molnar Cc: Mauro Carvalho Chehab Cc: Linus Torvalds Link: https://lore.kernel.org/r/bd1d504d930ae3f073b1e071bcf62cae7708773c.17= 42852847.git.jpoimboe@kernel.org Closes: https://lore.kernel.org/r/202503210602.fvH5DO1i-lkp@intel.com/ --- drivers/media/dvb-frontends/dib8000.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/media/dvb-frontends/dib8000.c b/drivers/media/dvb-fron= tends/dib8000.c index 2f51659..cfe59c3 100644 --- a/drivers/media/dvb-frontends/dib8000.c +++ b/drivers/media/dvb-frontends/dib8000.c @@ -2701,8 +2701,11 @@ static void dib8000_set_dds(struct dib8000_state *st= ate, s32 offset_khz) u8 ratio; =20 if (state->revision =3D=3D 0x8090) { + u32 internal =3D dib8000_read32(state, 23) / 1000; + ratio =3D 4; - unit_khz_dds_val =3D (1<<26) / (dib8000_read32(state, 23) / 1000); + + unit_khz_dds_val =3D (1<<26) / (internal ?: 1); if (offset_khz < 0) dds =3D (1 << 26) - (abs_offset_khz * unit_khz_dds_val); else