Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3008329pxb; Mon, 4 Apr 2022 05:39:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTHisOaiWs1yW2w6J2GPk7IbBUqpA6YcuQkopkiriKxzLEl2XIXx7zvZO1hI3EMNEqK5bp X-Received: by 2002:a63:1061:0:b0:399:5cd:3ddf with SMTP id 33-20020a631061000000b0039905cd3ddfmr7090983pgq.271.1649075987022; Mon, 04 Apr 2022 05:39:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649075987; cv=none; d=google.com; s=arc-20160816; b=UuCM/fbvuysow2yXHqyjKW3JOmgQvSXejibVljTBEhVvCfXpTbjAnwd2sH9gNGfp+p 6roTN3++YApWTdQqEIQ7f/WW/NGuHluEKflijjsgAqIznikUInLCtnl2KyPwXnnPPuFa fGjLzJpHmgBJoIjkP/kkc6oONEky9NwZtUCImDGg4tQKWOtI+IhvuKAS2l/NtzIfXikN 4nGdMciZyUDPumR11vlHui6Jbamj8DsUAldHgO91vFsrG78Lu1uJNuQgCwenPrM/8Fiu /15VX8MTpMd/NEQb/i8pCxYjb6jPMmiUmzb9tOzNVwymCM1i5ywDAfYDrmB1F6aVdVxW cQYA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=iezfqCSLi9aeu9geiwLSpu2ZGrh8RQtJ4hILxdTJPow=; b=C8uWAMvEL0wfzeDPLym36WB7Phadh2G7yeNCuJJZL7gC4VrANGu/PDSzgLr7XFu0MM xqLGBHWqELkIupi4yg0WfNxppOp9kDeaZQkWFcB/I4iNCz6x1H1EWvTycsrhQcC82gcJ fTUai6C0fYTf/LUZggUbhBi1MrQe5SWLpASqG5OKCYKrrVf5jfSTqhYGWWKlUHxc5uHP 25l84dAKYzmQKp7lDo6aXjk5IE6RSnLUQe8IIQhkuI143td+d1AtfohGwVxJ8FRc783E bpKNwZNYEKuaMPxhwkf+661GEP1vDzT7PIdcfhrZyHHDWDQdhkws9fjwxlqlR2AgU0Ho yCxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YtZhxs5D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c16-20020a170902849000b00156890a4f22si5361397plo.483.2022.04.04.05.39.33; Mon, 04 Apr 2022 05:39:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YtZhxs5D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241984AbiDDIuA (ORCPT + 99 others); Mon, 4 Apr 2022 04:50:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240841AbiDDItl (ORCPT ); Mon, 4 Apr 2022 04:49:41 -0400 Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0AC930F64; Mon, 4 Apr 2022 01:47:44 -0700 (PDT) Received: by mail-pg1-x536.google.com with SMTP id l129so7790009pga.3; Mon, 04 Apr 2022 01:47:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=iezfqCSLi9aeu9geiwLSpu2ZGrh8RQtJ4hILxdTJPow=; b=YtZhxs5DRluKygjqYGKUkZHGilAsQaQg+/Yh6XhjAIHye3WtPxHz6OVtRzlCw0j2AJ EPD/kRpfj7N4WP1druCEOIr8C5js8jI6h5uIGtsqhj7buJS4KE40uEjZs0uyq4MaPLPc 9Lp98IVFB6Sb0PT23Jjm+wQszcBoOuzxaiMyu9RB53sgu2pNXBIiuXzZKnM9fq+5R+T7 CznVXqTEM79IapOa7jfCD0H8pp5iZxKudOhjJKTYMLZTGFFZFvQXZh3FeaynGy6j2y4Q RynB/Fbids5KUpCXdFnFQ3HFRGKwf/jBvP59VoEBkmYQ4X1mWi/TCs8/cHjtzlLg9qjd ekCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=iezfqCSLi9aeu9geiwLSpu2ZGrh8RQtJ4hILxdTJPow=; b=uut79MlEpOHwSFHsGjZsEmYQUeqROGVMMuGFRA6sLyCzCD3gKH4L+zDwcroQGrzi4M 9sXSeD14S69yFEvx3Jr/AloSq6jZ5p6q9SGkuXl+k9dGu5ENC1t5bMOe6kJ13OoXVbQ8 Rkyweni4qOY1dLyrEOU4A9YsbIgN07ef40R1/sOUnJvFwv6iFq5Y3Y7ia8cMfVSAPLXm pNtQIyDa+/MwwVCCFZZsfKRxpgV22O2zYKK4nJdnd3LCreAn53iK9CgZN/wqUm4TSYPu w5c2TiyMTguT8TA8yV9ZCFwkRTX2Qe41nNarIqhnbWd73mtHvaERmxpC5pHK/9yOoKoq qOAQ== X-Gm-Message-State: AOAM533/wL+V2P5x0s/bgwLyZ7YSr0aPCfmHLXoAQNYJGTg+w3XFYBWg yVU8wZ58ZWHS5A3ADt4DSn22ocSw8Itgw6f1Ew== X-Received: by 2002:a05:6a00:4007:b0:4fa:9505:8ac0 with SMTP id by7-20020a056a00400700b004fa95058ac0mr22981759pfb.67.1649062063779; Mon, 04 Apr 2022 01:47:43 -0700 (PDT) Received: from localhost.localdomain ([144.202.91.207]) by smtp.gmail.com with ESMTPSA id u6-20020a17090a3fc600b001ca88b0bdfesm3991960pjm.13.2022.04.04.01.47.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 01:47:43 -0700 (PDT) From: Zheyu Ma To: deller@gmx.de Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Zheyu Ma Subject: [PATCH 0/7] Fix divide errors in fbdev drivers Date: Mon, 4 Apr 2022 16:47:16 +0800 Message-Id: <20220404084723.79089-1-zheyuma97@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org None of these framebuffer drivers checks for 'pixclock', leading to many divide errors, which we fix by checking the value of 'pixclock' in *_check_var(). As discussed before, it is better to keep the check per driver rather than in the caller. https://lore.kernel.org/all/YPgbHMtLQqb1kP0l@ravnborg.org/ Zheyu Ma (7): video: fbdev: i740fb: Error out if 'pixclock' equals zero video: fbdev: neofb: Fix the check of 'var->pixclock' video: fbdev: kyro: Error out if 'lineclock' equals zero video: fbdev: vt8623fb: Error out if 'pixclock' equals zero video: fbdev: tridentfb: Error out if 'pixclock' equals zero video: fbdev: arkfb: Error out if 'pixclock' equals zero video: fbdev: s3fb: Error out if 'pixclock' equals zero drivers/video/fbdev/arkfb.c | 3 +++ drivers/video/fbdev/i740fb.c | 3 +++ drivers/video/fbdev/kyro/fbdev.c | 2 ++ drivers/video/fbdev/neofb.c | 2 +- drivers/video/fbdev/s3fb.c | 3 +++ drivers/video/fbdev/tridentfb.c | 3 +++ drivers/video/fbdev/vt8623fb.c | 3 +++ 7 files changed, 18 insertions(+), 1 deletion(-) -- 2.25.1