From patchwork Tue Apr 18 17:25:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Thumshirn X-Patchwork-Id: 8382 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp3017337vqo; Tue, 18 Apr 2023 10:30:45 -0700 (PDT) X-Google-Smtp-Source: AKy350ZLMJ8Grxva6sSK+yrN2ZUosThCdE9D8b7QBmRCtXSkIJdi50wSooX++wjEojU5TFAstuY+ X-Received: by 2002:a05:6a00:15d5:b0:637:f1ae:d47 with SMTP id o21-20020a056a0015d500b00637f1ae0d47mr535816pfu.17.1681839044881; Tue, 18 Apr 2023 10:30:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681839044; cv=none; d=google.com; s=arc-20160816; b=sWQJOQYbsg/MUafDnF5t5md6DsWSUAX63apSJuMHAYfCmRNexeULgWG1PEAAoeL+xZ sPZFCtyfpb/SjU6MJztHchqYg8EhnQkcsEvTjmkx0TUmYgH2aZPP1O2nEOgG1Pz6fzqb 8c5qmjWnJn9OEm4jQYbq2wCw9cWQzKA6uzEWzN4rAVesIHZ6S/qCQBG+p6qQRBC76hs3 /BVbwuDFeF1JUqSY7FwbfTLaDEcbPhFb4NWST9wDlUc0XuLBwrDnNlGlFTHZGN58rv4c 1Q4VlYYLny2E0QrluV25heVLupIzURJBfafZC9C5NmlMKv+TWffKq2fF3papP/1ivOFQ uSdg== 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; bh=5v6TG43Q6Ul3Yw2SrINn59iVDlotZEfKLLIy9ug6DTU=; b=i4AymcJvRYB7qBDmSD2f0JcNGOAz09rBHMM0o25iIlgeH3gdKLnfXuI/yvxHj2lwAk YpdsqiK97yOOdk3TwSIxORMKJ6UBcuXKCItyNLjh9Li+CaPQ+vK6/bHXcCPEROwKVFO+ +/pfIqdQ2gp+ue1zBybYbeZnlEwrYEBAFqUNJLiE5wmCTiGxBLdhm2eW12v7so9cnWHy BVBS6QLdgVvNe+7v7pGmiGHHx2J/43Z1uOytprgi21mHDBb5BeGgrtvOFnvukO+J3uca sjTLWDELx82MoRu4RHj1wUpStyctmn7GmqamRRK3EYDmr0gIJzfrRdceLXxabP6h4tHP Ixwg== ARC-Authentication-Results: i=1; mx.google.com; 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=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r204-20020a632bd5000000b0050f64740c13si15033293pgr.622.2023.04.18.10.30.29; Tue, 18 Apr 2023 10:30:44 -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; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232338AbjDRR0f (ORCPT + 99 others); Tue, 18 Apr 2023 13:26:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232137AbjDRR0e (ORCPT ); Tue, 18 Apr 2023 13:26:34 -0400 Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64283B46B; Tue, 18 Apr 2023 10:26:24 -0700 (PDT) Received: by mail-ej1-f41.google.com with SMTP id xd13so41241247ejb.4; Tue, 18 Apr 2023 10:26:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681838783; x=1684430783; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=5v6TG43Q6Ul3Yw2SrINn59iVDlotZEfKLLIy9ug6DTU=; b=l1ZWGR7z3U3fRc3JoV5vFVLukZ2/5uPJx/XLiXruTNlfeod+iK/GZBB2MNbPW3fn6b oXnHXPzwuBiKHpK6Nh41m/x7tjOzWfRL6kwYbRyvCj4HsVrCYXXZpXFavDXbjtnwtKHw b78lYkEYOCClmTdNmR70iKodXMdtd4/oo//67Lzk2lYQwSNUkwi3T88tlNdNcIFz851N 9GR5bdLerrGrtxjNQMLuFQvPO6oXS8b9SPkfRyh3g03dJ1GqQI15NudKWiXtmcXtesLM zoEmQzDg8i4ZBxLTEX94T2HJBRKjPjPArDd7S3aIfkgLd+D8tG355MxojZClHJQ8rXrC FHlw== X-Gm-Message-State: AAQBX9fhgjv4f4zcU1CPh2S4/IK4ZN8kQiAmFH1wALUL2NExO6JsXvow t28ZLUWHAy6gGi1BBGSEakmwcmhhSg5aAg== X-Received: by 2002:a17:907:77d5:b0:94e:f738:514f with SMTP id kz21-20020a17090777d500b0094ef738514fmr11584269ejc.13.1681838782686; Tue, 18 Apr 2023 10:26:22 -0700 (PDT) Received: from localhost.localdomain (aftr-62-216-205-204.dynamic.mnet-online.de. [62.216.205.204]) by smtp.googlemail.com with ESMTPSA id j23-20020a1709066c1700b0095342bfb701sm63259ejr.16.2023.04.18.10.26.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Apr 2023 10:26:21 -0700 (PDT) From: Johannes Thumshirn To: Wim Van Sebroeck , Guenter Roeck Cc: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, Johannes Thumshirn Subject: [PATCH 0/2] watchdog: fixes for menz069_wdt driver Date: Tue, 18 Apr 2023 19:25:29 +0200 Message-Id: <20230418172531.177349-1-jth@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763536058280919090?= X-GMAIL-MSGID: =?utf-8?q?1763536058280919090?= While testing the Qemu emulation of the menz069_wdt watchdog core, I've found two issues in the kernel driver. On is a NULL pointer dereference, because the driver can't access it's private data and one is a wrong register read resulting in incorrect timeout values being set. Johannes Thumshirn (2): watchdog: menz069_wdt: fix watchdog initialisation watchdog: menz069_wdt: fix timeout setting drivers/watchdog/menz69_wdt.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-)