Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp340855lqp; Wed, 12 Jun 2024 03:14:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVCfxNuf1+55loafPIb+zvuzJlYmiQh7BhmiTvu8G1iRJdBFmSQC+TtaGXbTxUCgWaWew07nQAka84TQlOjcHbmlwB3Ym4Cah+101gUiQ== X-Google-Smtp-Source: AGHT+IFkVmcTRE5CyvaVsGl/HKVo+AR6Y2u1GjvhNMpgRkonJAcSbraokqUvJQ6gs/Je3NKzuatH X-Received: by 2002:ac8:7f4a:0:b0:440:6181:8238 with SMTP id d75a77b69052e-4415abb0510mr16765111cf.4.1718187292686; Wed, 12 Jun 2024 03:14:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718187292; cv=pass; d=google.com; s=arc-20160816; b=0AneY6lMKp+JfzfQFxYnjfbgbkIiRrw+4yfAnpp+ouW1O4rVToxOR4eYWW8wPPO04n gZlvktwbWlbRrXkIhvFIwEFq30uozAK4j2L0iPhx+u5SpGeFQhOJRG6PG8et44x7uIrr SAmTznRtyz1yDfkrHDZZyOIGrdL918duOFTs7LL4OUeqFpxJzevvNdsHjw5Mk34ENEDe x/r3kqpsdOxNA/kEQMlGctCOYmLJ0XvLnpfTZDIjv8gayotplWWOt0rmKKfPqulNBbh8 joLdzguIfmfQZl1VABOe+zHc9b8ZOYDRNM9wSBbG/hb0s0AEBuqU5dW3HXQU8JZT7Z3b trvg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=F1N0NfWSGU2xjNToB7XxMF3lDRv4WElvZ+cfjLMi2Zw=; fh=puGbQZWreDafPW9H5qXaejFc8t6KmxQnMhWg1hxnMx0=; b=MKZ3a5NvCnGh/gH+7ELa2UOnjpHszobH5gclYtHX+0+xv0PAnoI9Vg1j2nnBi9iPes 0wnk/1AcBCa3IM5YYIujuPImdX5OkocSIZeSJJu+z2VO9brSikN0kaZvzgr4nlLGC5jb LbD7Kv0hutn9sgMfCXMgTK99/JAl9yNOaPtj+Ijd4QTg80cfvUa+vz1vdHNTq5WlrW5A pMDBuEewqXyRl1208aLHN3Y4pGyPvfvRDvELVIIPh+gtBHOSXifLGarZZPIUBNS/os0Y TkEyiuE1+K9xRwCtCIeoF65w5iL6G6Za8lNyPtgxHR/HuJrxiyOMG3v6ShRCWjpLufmo UOxg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=ZowhKtiv; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-8850-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8850-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-440547d3103si121607841cf.55.2024.06.12.03.14.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 03:14:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8850-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=ZowhKtiv; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-8850-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8850-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 124F51C20ED1 for ; Wed, 12 Jun 2024 10:14:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BD69B16E87A; Wed, 12 Jun 2024 10:14:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="ZowhKtiv" X-Original-To: linux-wireless@vger.kernel.org Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 5C9D62576F; Wed, 12 Jun 2024 10:14:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718187287; cv=none; b=LeXW8ovPxxOzzetfs8Y2zOYXQ4S+ncg9WwU0IjaC89J90YUPIFE6ORdChsd7yNbk5y9m1FfRlsCs7Di1kRZelo4RNFDQmaZlj+pAEgO22MscQH36OkiLolc+x4r+4HQ/2rIu3KhuGVmIm4Xb7JYHOKXCim6frcH2kRCPK1pAyr8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718187287; c=relaxed/simple; bh=F1N0NfWSGU2xjNToB7XxMF3lDRv4WElvZ+cfjLMi2Zw=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=Sa0hWAEaJhH7f6W0D6hZZipS/dCYe2Qjg7py78pHwqx+GJkw/LST70N/uewBEGGwTOzEHQDQzV2Q2FiXXi1Oh6iueP8w7TqjbwZljuRolhemYSPb2kSvu7UmzXfpVDC7z9gQuiFz0OYoX3EHHImBDBmfg8N6Bcv57n775abZz9A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=ZowhKtiv; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=F1N0NfWSGU2xjNToB7XxMF3lDRv4WElvZ+cfjLMi2Zw=; t=1718187286; x=1719396886; b=ZowhKtivNLhfXneHCRFJtIEPtfuOo4gWWSvJNajL96gyC6h 7jpOK6oU2xk5puxvSzuFT3dw486yoa94wNlBwcKgJGyKNJ5k40PNXuKliK1W+czcnRgCLBnWPY9Ac pd85CjuMOGdx1sfUnFL6XiIYaDXpmXdJiAlVmPm4dOmszrPd4N46Kd3lG0hsTTCMFlqe1UgCtq5xU Bo1BKszTS2MRTjohKY+c3j+5+Ug0IH6ByX2SceJggrveaVrZEEXdgUyJvRnZcKqP294kz5SDHJnpX yrZ4itIz/lo81Jzt4jJtNb/7QryIGkMPJa2vgPxUBYdu2NCm9IPMi9QHTAX3RQEA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sHL03-0000000A9PT-0srd; Wed, 12 Jun 2024 12:14:39 +0200 Message-ID: <42e6c6ec01df0de6c1bf8b7610758d0f1ef8ae7c.camel@sipsolutions.net> Subject: Re: [PATCH v1 1/2] net: rfkill: Fix a wrongly handling error case From: Johannes Berg To: quic_zijuhu , davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, emmanuel.grumbach@intel.com Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org Date: Wed, 12 Jun 2024 12:14:38 +0200 In-Reply-To: <9ab68c04-b33f-4f76-a563-2bc9d6c01401@quicinc.com> References: <1717771212-30723-1-git-send-email-quic_zijuhu@quicinc.com> <1717771212-30723-2-git-send-email-quic_zijuhu@quicinc.com> <5d901b213389c38eb5bd1df37cb8a1c3d82ebba5.camel@sipsolutions.net> <9ab68c04-b33f-4f76-a563-2bc9d6c01401@quicinc.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.2 (3.52.2-1.fc40) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-malware-bazaar: not-scanned On Wed, 2024-06-12 at 18:12 +0800, quic_zijuhu wrote: > On 6/12/2024 4:15 PM, Johannes Berg wrote: > > >=20 > > > use pr_err() instead of WARN() > > > for this error case handling. > >=20 > > I don't see anything wrong with the WARN here, it's the user/driver > > calling it completely incorrectly. > >=20 > the function is a kernel API Sure. > and it is handing invalid user input. No. johannes