From nobody Mon Jun 22 17:40:09 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E274BC433FE for ; Sat, 19 Mar 2022 09:13:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242563AbiCSJPJ (ORCPT ); Sat, 19 Mar 2022 05:15:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235753AbiCSJPI (ORCPT ); Sat, 19 Mar 2022 05:15:08 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B8748F981; Sat, 19 Mar 2022 02:13:48 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C344060B3A; Sat, 19 Mar 2022 09:13:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D6462C340ED; Sat, 19 Mar 2022 09:13:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647681227; bh=22T0ajWd/qzOaiblrlgGkZADkyqqjG568UryfuCjbM0=; h=Date:From:To:Cc:Subject:From; b=OOgT1Tw90x9P1B75wbKJWf+RgHYzlUMULOaGa65N3uMu3Dkr8TJEXEb7tdDk7DNMS tU8uT1WVqaNqPtW5GngJpvz0lCXe9YIE4z5vsQ1qqA2BN+U+3pg22+E4SuusmPy21b aioHr3BuajUFsilIsAit3K4EAZ1lX7S8xCo5vrfE= Date: Sat, 19 Mar 2022 10:13:39 +0100 From: Greg KH To: stable@vger.kernel.org Cc: Lucas Wei , linux-kernel@vger.kernel.org Subject: [PATCH v4.19.y] fs: sysfs_emit: Remove PAGE_SIZE alignment check Message-ID: MIME-Version: 1.0 Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Lucas Wei For kernel releases older than 4.20, using the SLUB alloctor will cause this alignment check to fail as that allocator did NOT align kmalloc allocations on a PAGE_SIZE boundry. Remove the check for these older kernels as it is a false-positive and causes problems on many devices. Signed-off-by: Lucas Wei Signed-off-by: Greg Kroah-Hartman --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c @@ -567,8 +567,7 @@ va_list args; int len; =20 - if (WARN(!buf || offset_in_page(buf), - "invalid sysfs_emit: buf:%p\n", buf)) + if (WARN(!buf, "invalid sysfs_emit: buf:%p\n", buf)) return 0; =20 va_start(args, fmt);