From patchwork Thu May 2 18:46:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 10927521 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BD7301390 for ; Thu, 2 May 2019 18:46:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B13FB23794 for ; Thu, 2 May 2019 18:46:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A5F7123B3C; Thu, 2 May 2019 18:46:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 568B523794 for ; Thu, 2 May 2019 18:46:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726336AbfEBSqm (ORCPT ); Thu, 2 May 2019 14:46:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:55302 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726144AbfEBSqm (ORCPT ); Thu, 2 May 2019 14:46:42 -0400 Received: from tleilax.poochiereds.net (cpe-71-70-156-158.nc.res.rr.com [71.70.156.158]) (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 53ACA2087F; Thu, 2 May 2019 18:46:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556822801; bh=sPYJn4YN9Ra0AqDhB975cHz1o3cnK0a+61Dr9oBxIbY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A5HaPhVHoIKDAH9HPtwqFuM57zYJoeUJsrcsvUcb1/y5A+FKjZc3cc+eLJgEtthql yN52mnfQLrxG9gnp6DxcbdPe3SlCoVRHikvCTzb4RfGWrKY4mWVSM5LjcXG7+F1vgn VWEUUWGagmWJqEGM4GlpnXcOsdWU082AUCNX3D7k= From: Jeff Layton To: zyan@redhat.com, sage@redhat.com, idryomov@gmail.com Cc: ceph-devel@vger.kernel.org Subject: [PATCH v2 3/3] ceph: fix unaligned access in ceph_send_cap_releases Date: Thu, 2 May 2019 14:46:38 -0400 Message-Id: <20190502184638.3614-3-jlayton@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190502184638.3614-1-jlayton@kernel.org> References: <20190502184638.3614-1-jlayton@kernel.org> MIME-Version: 1.0 Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" front.iov_base; - le32_add_cpu(&head->num, 1); + put_unaligned_le32(get_unaligned_le32(&head->num) + 1, + &head->num); item = msg->front.iov_base + msg->front.iov_len; item->ino = cpu_to_le64(cap->cap_ino); item->cap_id = cpu_to_le64(cap->cap_id);