Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2392105pxb; Sun, 17 Oct 2021 13:36:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqcUo12ECQv9C5p2QzX8wCmMRnQT4cLubR/Q1jW/DmYhHAUX2f51/1lNaFqe/5eHY8pC8e X-Received: by 2002:a17:90a:55cb:: with SMTP id o11mr43918751pjm.244.1634503005075; Sun, 17 Oct 2021 13:36:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634503005; cv=none; d=google.com; s=arc-20160816; b=RGVGaPIMCm+krWWf33OhYSyGdArxHs8o/kAyIIRcfO5UhR0++iIsIVMAQpRCqqolwi ZsRVH0Qz2VHEkyQjoL6pwsT21+6Ml24b3u1gDWhod+4hnRE7D2G+VJnDnOJ/B4ctQ+VJ 2t6Eed9SCpy/UEaVqmpsM4AteLB8nFCj0GiVQWK7DNzUTFTIEB3swNFTxjgqphFYSaKI mw2kuVXG2XBlHQOx6zB2oQ5Cb9OEq0l4N3T9I39x3mhgv+u7dGCIlOnGxn/9KjqS49Kd E28lX+IvPdI2L46yv0okMULbnuuA3iDUSwnUit6s3hDZZbRlXMrQ7eQ0KnPjXybHB9ju /zkg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=iygAvTo+NKIrTrD4fcNBRkRGzuwywRkDwyJ5/W9eHvQ=; b=SOmYnOfrg73QkKeUFlOguNEQux6H9OyYJuDXK8+nVWTVtF3Z+iX12uJKn8r5V+CKzI +jnCMUQhsXg+11p9mwTjf2ubK85WAlOaXHTmUvAgrEqjqlJUcuHF2slxWCCcRLnWpLSo bsUvzRvPI2ZhZ5BizSqdz3ZxqM3/BEqVDdaOg2zLRFJPl+uttKLWk2XeNGEjWur1G7qv gOvT4G/XPLkp6OowbWgHZs6mVgr1Xn4eSZjDuuhUNkedx5wKt7+YjAvZgBLTtm4qLzpR e97HdKrH6tecuxVk4/0RxEaBd+FY1SN6GGe10ru1lEa5xHVAN2V1YkY3/5UiD5P2Lz06 XbLg== ARC-Authentication-Results: i=1; mx.google.com; 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 y10si19061546pgh.407.2021.10.17.13.36.32; Sun, 17 Oct 2021 13:36:45 -0700 (PDT) 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; 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 S242611AbhJOTOf (ORCPT + 99 others); Fri, 15 Oct 2021 15:14:35 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:56391 "EHLO relay8-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242589AbhJOTOe (ORCPT ); Fri, 15 Oct 2021 15:14:34 -0400 Received: (Authenticated sender: alexandre.belloni@bootlin.com) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id EEAC51BF208; Fri, 15 Oct 2021 19:12:25 +0000 (UTC) From: Alexandre Belloni To: Yang Yingliang , linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org Cc: Alexandre Belloni , a.zummo@towertech.it Subject: Re: [PATCH] rtc: class: don't call cdev_device_del() when cdev_device_add() failed Date: Fri, 15 Oct 2021 21:12:21 +0200 Message-Id: <163432513381.815620.221714122932676041.b4-ty@bootlin.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211011132114.3663509-1-yangyingliang@huawei.com> References: <20211011132114.3663509-1-yangyingliang@huawei.com> 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 On Mon, 11 Oct 2021 21:21:14 +0800, Yang Yingliang wrote: > I got a null-ptr-deref report when doing fault injection test: > > general protection fault, probably for non-canonical address 0xdffffc0000000022: 0000 [#1] SMP KASAN PTI > KASAN: null-ptr-deref in range [0x0000000000000110-0x0000000000000117] > RIP: 0010:device_del+0x132/0xdc0 > Call Trace: > cdev_device_del+0x1a/0x80 > devm_rtc_unregister_device+0x37/0x80 > release_nodes+0xc3/0x3b0 > > [...] Applied, thanks! [1/1] rtc: class: don't call cdev_device_del() when cdev_device_add() failed commit: 789c1093f02c436b320d78a739f9610c8271cb73 Best regards, -- Alexandre Belloni