Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp392350pxb; Fri, 8 Jan 2021 07:38:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJySD1Usm/1hRrSTF0/bJgFBtoVfjlA8XFFBCOQYTHJt93EeyJpZBnpOOpZrHWSycTVyjJ5b X-Received: by 2002:a17:906:378f:: with SMTP id n15mr2935081ejc.263.1610120283381; Fri, 08 Jan 2021 07:38:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610120283; cv=none; d=google.com; s=arc-20160816; b=ySKVcMlGuA+U2+86g3xhLhUawfGwvQEDv4VsPBMNJ+Jq/IvV3N/KtUwgR0BC/Am9ET Q2QUYd03tL9FLUL8JdIBXaJeeK+lz3uNf23NXi6GtS1g+9gEIGtJE8qBLZl/52p/IV/5 /FYDoPOcQYBwheUTn4fs8fLGHo8kBOz0OwCcO1XvjiDOj2sFnF/ajvERJ6lSxsn6YxTf HvjhgN/tWZRRhKDT9dItq97vrnEZxZeNPFRHpoVxaMOaIJoTpElzSpLZtFf0a5i3M98Y W2w5aY8/BlXRQpeTrZam6tuWpOZ1BA8kyohS7Ms6RKX3b3TLDD07wsF5wgRRbieetpFI fy/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:sender :dkim-signature; bh=PxfKbo/Ze1UYEnyLqJyQ+l1xApQcxjj0mRY/83IgHlg=; b=S1IYcGv5tpr4hehV1jEUq3FO8/42Bcy9JHQhrdD3D/FPX6hwE+odfGOS2CdcMARzIP 6sukL7V1VhV2quKIL50dOOpx4OkTP3NUxLRZ2asX+JCgf5e8b6frCVz1pDMjfTwgSZ0s 3PJy6arppiY8e+cdRR5aq3P+O5AA2nja0Hg5l7aA8QLi454Mhs+z1sPGpvnULm7iMGXr 5bKD+8h4vYROc8tgo0hdsCf/RtiGSfCV6Qic6iYvcuCTXsZQND8qjFGNfKYFCfIN7dOQ YgHBBFo3NYQzsmOK3Dlr5d9OniVM/B2+R1VKYvMwjMofFSArCvuvzG2MI8qEGRbGGEL4 /5bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Z/tiZeGF"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u9si4003560edf.278.2021.01.08.07.37.40; Fri, 08 Jan 2021 07:38:03 -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=@gmail.com header.s=20161025 header.b="Z/tiZeGF"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727948AbhAHPdg (ORCPT + 99 others); Fri, 8 Jan 2021 10:33:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727931AbhAHPdf (ORCPT ); Fri, 8 Jan 2021 10:33:35 -0500 Received: from mail-ot1-x32f.google.com (mail-ot1-x32f.google.com [IPv6:2607:f8b0:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9383EC061381; Fri, 8 Jan 2021 07:32:41 -0800 (PST) Received: by mail-ot1-x32f.google.com with SMTP id j20so9994548otq.5; Fri, 08 Jan 2021 07:32:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=PxfKbo/Ze1UYEnyLqJyQ+l1xApQcxjj0mRY/83IgHlg=; b=Z/tiZeGFENf8jEpMCP2cXuG3JdPh+B3mIjUt8P3RhVDPXwsSBv1ArVnySGo1i/UdFu zCcF0hXUJqngHpUUu9dMZLOIXOkE7/dBoZA+3OzeHiv5AbUxGVk51EfcybB3BZyYf/7S VGzB8vAui+KZedNE5jYLhK9yQC+UoFqss9Ivw6Y4uldwRhK0bmiAl3lwivfmBhTWNmQ3 UpvgDRJWQFqWKN2soPvF/5AAwHaoeTTDtBeZI/JcOefwMzbSDQyGPLcna/VsFkV/Q1Lg d5pdCmehROCOk27gNzzTlhCh1gKR3n669w4OV6SXJk0b7XBPPx2WVYjlerOZ6IyhK/QN 5i2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=PxfKbo/Ze1UYEnyLqJyQ+l1xApQcxjj0mRY/83IgHlg=; b=TlbjI/0ZpKOOp7ryFfpKJXVv7WIrMxooktchjYnO8A07sq7C2tE18A+p3F3KjhuMND JYMfcOr8+BoNrkxyXhJ+AhmKjXIhO9sIXTVkz34ZSzufgmPP3MwkjnzY/F/vL/03jI5w Dz7aypXU5pPIDopkuhsDsqDAAeV32+7Ilb1x85yInSFFd6tb5ddY7TuIA/4H6JCD9IFS DW6w7knxK9N4YQ56vOJMNgv2UniccuG/A8bIM9V9IHEe5VWXKNGsXahJnE5f8QUOfJOQ vdzydSmFbkKZHnVoTWBFm19EIkpWsAfM3tO77o900yw+HRp71bKTXshdDuaIHM7BlGbe kTig== X-Gm-Message-State: AOAM532zMPnmPbKUNK3xuggLP7d02SiWz/FDMhfJnbWJLn3N+nQy20ob OVk+D4bhQKWrvPONJU3Pc41DBKrwnU4= X-Received: by 2002:a9d:7b53:: with SMTP id f19mr3002189oto.93.1610119960068; Fri, 08 Jan 2021 07:32:40 -0800 (PST) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id 39sm1816229otu.6.2021.01.08.07.32.37 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Jan 2021 07:32:38 -0800 (PST) Sender: Guenter Roeck Date: Fri, 8 Jan 2021 07:32:37 -0800 From: Guenter Roeck To: David Arcari Cc: linux-hwmon@vger.kernel.org, Naveen Krishna Chatradhi , Jean Delvare , linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] hwmon: (amd_energy) fix allocation of hwmon_channel_info config Message-ID: <20210108153237.GA182053@roeck-us.net> References: <20210107144707.6927-1-darcari@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210107144707.6927-1-darcari@redhat.com> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 07, 2021 at 09:47:07AM -0500, David Arcari wrote: > hwmon, specifically hwmon_num_channel_attrs, expects the config > array in the hwmon_channel_info structure to be terminated by > a zero entry. amd_energy does not honor this convention. As > result, a KASAN warning is possible. Fix this by adding an > additional entry and setting it to zero. > > Fixes: 8abee9566b7e ("hwmon: Add amd_energy driver to report energy counters") > > Signed-off-by: David Arcari > Cc: Naveen Krishna Chatradhi > Cc: Jean Delvare > Cc: Guenter Roeck > Cc: linux-kernel@vger.kernel.org > Cc: stable@vger.kernel.org > Signed-off-by: David Arcari > Acked-by: Naveen Krishna Chatradhi Applied. Thanks, Guenter