Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3527137pxf; Mon, 15 Mar 2021 11:32:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGMNZWO5Lfxc/V5T29N9+wgG0kis5VlEZ03+kgXtHjwebl6sVeAVL/RkfCLPoduJv9Hr/R X-Received: by 2002:aa7:c0cd:: with SMTP id j13mr32535033edp.41.1615833135649; Mon, 15 Mar 2021 11:32:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615833135; cv=none; d=google.com; s=arc-20160816; b=TcTiudN2CfK+YVteNEWNdktjbMiy0brdJbJk7E6qrq7i/uN7BRdk9O414ypulZ7fOW JgWSrI2D23qL+2siKqG+LpmibTRth8IJiu5KRBchZnDrLIWkABQT/B+wa9+/4gEIRs6H t1Y6zSHCAwdf4uX6gvlpyht0rTFxQxBPeo5d27JjLjrNpcH/+8q12ijvKCNUs4zH1JbE 1vBSG1OS/Ol4tsAjHQTUgFCqPeG1tS4IOvc2EZGJdKIq7PNFRURm0ImFfhqkyky93jF4 NENAt0s0hoF0yqLoyG4tK2puLKwUpNXfc0qstRF9uGhcl6Ytc5gTGhsClPovrDFF3KL6 3e5g== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=L5nMrBU67To1rJVrxqfAegpBNOOUXUsBg56EaUoJEYs=; b=Sar7X3N75KPpIaEBla/KAUiWTaZ+8o1TCWUowsXYa3BQiFjaKrCfNJX0ekqhiWDxBW wzHZ4bqvX8LetJiFC7chudXLO44TiU+AxTp0sUcRwh9smx9sAoSKoN8fYq+k9GF/4QWO eWDRg4YlUM1oYdfB/yUKGJxHV4em484tQOHEGfFMpcR6YgF6aPhnYpMzOTmxBlsOIztF lrMAv7dZ6RDT9ZbKEy5rDbZLP7w1WdHdxkuZzbxup0s7iBtuyuH7dpgdE5P1QObdhyqs LHXmfBmG1gE5qSXDjsfhBDR3x8cmODAMDBTClMnb79V21KBD5tdHLICTM4H3n7YQ3paV sR1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ONC+r4bc; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d3si11321287edq.276.2021.03.15.11.31.53; Mon, 15 Mar 2021 11:32:15 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ONC+r4bc; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237751AbhCOOlJ (ORCPT + 99 others); Mon, 15 Mar 2021 10:41:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:49270 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233981AbhCOOCq (ORCPT ); Mon, 15 Mar 2021 10:02:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AC45864EED; Mon, 15 Mar 2021 14:02:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816963; bh=Q+YjfkhwSTBDRku2nQrgouG+wdGpbcbrWoh9NCCjMvE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ONC+r4bckSZ+bsvyQs0HegAK7ALOVsaEyV2idFTMNLkc6bbx+TcepTOUZAAfDhLco ZqQIgDFlZmICG4GWGoSVZxyGNDw7rGmZXNSDjofKRM+8hIH27vYmnbM5wm6BKOtBEU NFbzVw3BbZuxpJq9Ev7g2fjfOxFu1Xn3El2pYlPA= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ian Abbott Subject: [PATCH 5.11 232/306] staging: comedi: das800: Fix endian problem for AI command data Date: Mon, 15 Mar 2021 14:54:55 +0100 Message-Id: <20210315135515.476774027@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135507.611436477@linuxfoundation.org> References: <20210315135507.611436477@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Greg Kroah-Hartman From: Ian Abbott commit 459b1e8c8fe97fcba0bd1b623471713dce2c5eaf upstream. The analog input subdevice supports Comedi asynchronous commands that use Comedi's 16-bit sample format. However, the call to `comedi_buf_write_samples()` is passing the address of a 32-bit integer variable. On bigendian machines, this will copy 2 bytes from the wrong end of the 32-bit value. Fix it by changing the type of the variable holding the sample value to `unsigned short`. Fixes: ad9eb43c93d8 ("staging: comedi: das800: use comedi_buf_write_samples()") Cc: # 3.19+ Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20210223143055.257402-6-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das800.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/staging/comedi/drivers/das800.c +++ b/drivers/staging/comedi/drivers/das800.c @@ -427,7 +427,7 @@ static irqreturn_t das800_interrupt(int struct comedi_cmd *cmd; unsigned long irq_flags; unsigned int status; - unsigned int val; + unsigned short val; bool fifo_empty; bool fifo_overflow; int i;