Message ID | 20191211150355.402771505@linuxfoundation.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:ac9:44c4:0:0:0:0:0 with SMTP id t4csp921045och; Wed, 11 Dec 2019 07:26:26 -0800 (PST) X-Google-Smtp-Source: APXvYqweHzrkjxcdJToTaAZ9rypjkoY5QpvnqobxIRaeYM6YF8ie2isOIU7OulZILWs/B00EtVV8 X-Received: by 2002:a9d:6396:: with SMTP id w22mr2738355otk.364.1576077986351; Wed, 11 Dec 2019 07:26:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576077986; cv=none; d=google.com; s=arc-20160816; b=IvoeDyOR64Ug1c9BOZ8xI9h8Wyz4T2okQQyHhGh04veS9IinJN9ztPy2GZcpS8PM7z OSha6QYXS4Ng1WaG0rBGiZav7irt/8ME67MqCdhbUcdMyFrGaN+m/smmfSqVranb4byg 4gZj2nx8HQ1uIZDfaWqdTJVrtoSHj68+PEwNFa1U1i+JYssrQX1h2IILpH194cA0/+Oc cv48QJx85LsdsWLFGA+w9fZf7UbrG9xSj5PwyUjGWXYjUN9u085B9qOeXZOzYFvlE0zR L8hg/yeqgF0j1gLPAUNqf6Pjw7o7E13GM6sM3M3+zmTgyk1JKApXTqaCFPn5+ba21GWe GFew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=UhOp/l3ujFqz6RAm/8VTdFIsvCu9tVGgETC5hzpHcUo=; b=iRrQ7XyIsuHNKGSQz3kvubZ0jarX3LFpFNvIERf/CVd4zP5Bt2FfNUNJ6awzHTBUMe u/zo07r4d/+pF0Sm456h+0VhztoNRtJmAqPa9oEpLcfOOasGHNOj8cv11mBzzUn6/0Ed 0ORMcmg+cqH00hZpD4kG8EpXYa1qCWhOqLRK5ImiGQ86eeSaDuDC1pZGAEjRE8LuLqup OSJBIu25C5kn4sHWmzL8vjEX5fvNI1TQ16UAM8d+rjU7IVScQC6CgwiPX8KYdpF21FXc LzamIyPzI8eDhhZA1hfHm/A2OxyFUPr+G0jIVcmIr3MHTLYtv2PmK3ZFvO0QsIcYgA3a YFFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ugZx38xq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z25si1303201oto.211.2019.12.11.07.26.23; Wed, 11 Dec 2019 07:26:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ugZx38xq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733081AbfLKP0L (ORCPT <rfc822;christophe.lyon@linaro.org> + 27 others); Wed, 11 Dec 2019 10:26:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:58924 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731095AbfLKP0D (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 11 Dec 2019 10:26:03 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4683E2077B; Wed, 11 Dec 2019 15:26:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576077962; bh=bMEM8CgX/6uIErmN9B5ttGlNi4wBwVVcAmuXfFf4Z8U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ugZx38xqhotAWnWlB+tyu8dyndm9NgE3kvSkaWua2yhlxBWRAEm3zuBFgQ3Hd5/jz lmVeVHz8kgY+R1LCh4N+GLOMu9ZhrIXXg3ZbS1LMqmT/zrrPQHgrZGLG2oRQHD/JI1 3EDKk69blEzD4jz0svYXk/+7SoDBcGkMpj4dp3eE= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Viresh Kumar <viresh.kumar@linaro.org>, Jason Gunthorpe <jgg@mellanox.com>, Sasha Levin <sashal@kernel.org> Subject: [PATCH 4.19 238/243] RDMA/qib: Validate ->show()/store() callbacks before calling them Date: Wed, 11 Dec 2019 16:06:40 +0100 Message-Id: <20191211150355.402771505@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191211150339.185439726@linuxfoundation.org> References: <20191211150339.185439726@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
None
|
expand
|
--- a/drivers/infiniband/hw/qib/qib_sysfs.c +++ b/drivers/infiniband/hw/qib/qib_sysfs.c @@ -301,6 +301,9 @@ static ssize_t qib_portattr_show(struct struct qib_pportdata *ppd = container_of(kobj, struct qib_pportdata, pport_kobj); + if (!pattr->show) + return -EIO; + return pattr->show(ppd, buf); } @@ -312,6 +315,9 @@ static ssize_t qib_portattr_store(struct struct qib_pportdata *ppd = container_of(kobj, struct qib_pportdata, pport_kobj); + if (!pattr->store) + return -EIO; + return pattr->store(ppd, buf, len); }