Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp316013pxu; Fri, 23 Oct 2020 01:11:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxFqB6GCU9VPYrRPsFQqBr/OsmPUxNOabJZHhhk1kwWvaEerHluKDEPeCJUr0eUweeMDQ0 X-Received: by 2002:a17:906:81c5:: with SMTP id e5mr828202ejx.10.1603440679748; Fri, 23 Oct 2020 01:11:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603440679; cv=none; d=google.com; s=arc-20160816; b=J7rwaanw7oZYvetvHd6tcH7GBFRG3IFhTvMDddRWQqG07J0kXHNVrN5eGQVbvU/Rs5 dLT+SFzRgRzAQ7D3+5Pa7ybEVjk7LCQ7IaZe/fTblHM4gJjgq4MDacO/xd+CzEbodtPb gWfpkV6QF1gG2L9EwVQVkwqHfErwoFlm4xSB2agE3HVRTDNdqkJ2wdW52RQbY/0BVNjT 6LUXHxApoNwxPcnuji89fmQZDYPt75UgNNbldnCDQEus0iq50GrepNYP0yINijYjGiTu JVgBtoWpig/HgIP5SM0+uMCkJmtXP72V0TCAXKc/BhoqwLxLawQjcdUFMfeyTe6pt4vG Mlig== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=VWEgyRKyuD8Al2J5jv/DfuVXBHrVMDS7b+Ko3pQcdGs=; b=k4kw0MD8owbWbdksNENwKFvPcCSTf07+K8uJSeFrQdp2VwIR8MxxRPla6z0XkWMoRb u+hHAK4Z6U2B/K29f5G7nEjlTSgucSzB4M/zHtnUICW3LMZTSuJjooGiifNmJqm4l06E VSsknKNl+HtVd6Y2uMditQo+sw2sFYLaM0wGhAPmNmS/RiPnXQG0qgceVjv8TUuQmPLo 1ensfp0OkcVwhIiM8urHe2n9OriSZwhE8bcuvG+ptR3ecNNXlco7ZRa+DXVyDZYf2sGz uB68uv2/PSJ7FQMklbfQ0zbI/k3qhR1ZNaYN30BRhDnQ+C579vAGx9ZoYZHiHwalqk5b TPeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=t3YqLDMe; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t16si357909ejb.494.2020.10.23.01.10.56; Fri, 23 Oct 2020 01:11:19 -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=@gmail.com header.s=20161025 header.b=t3YqLDMe; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S373716AbgJWG6H (ORCPT + 99 others); Fri, 23 Oct 2020 02:58:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S373558AbgJWG6H (ORCPT ); Fri, 23 Oct 2020 02:58:07 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A462C0613CE for ; Thu, 22 Oct 2020 23:58:07 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id h6so482659pgk.4 for ; Thu, 22 Oct 2020 23:58:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=VWEgyRKyuD8Al2J5jv/DfuVXBHrVMDS7b+Ko3pQcdGs=; b=t3YqLDMe682M0O+O/QgLfaOkTW0bWUdMZZAkWQsRi9mAcQOOgztU1eepQDVe6eN6+c i7ZQLp+qYPBr01UClq0A/vSRkWEQXx6AjerYLDkcM2n+4yJgzWmy2VZhAHYwQcGveVVs gsfmQVko7SK0rSZ4rGdhc91MkQApNNhGSHzqahXFFKAiIU5MY4TYh0vpeQJobPY54KQH QPaVx7oH2wFPZMXm+jd0R8ucYTgJLqjgsG1rb56JGZ8cR4FFaV0ap0NRmeDU2URP8pMg 3nEslED9SY+66lLO+NrO0FykbBiVXQ+JdqSNXqlWfsco28QWsi2thHLNCAQ84I5jnTHh cA+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=VWEgyRKyuD8Al2J5jv/DfuVXBHrVMDS7b+Ko3pQcdGs=; b=C071J28cgwPHn0h3isyWcN335yIKzLTTEvkGyxxyIo/PR1yuKYDCwMieLVOQbflb6w hdOjwxP1FY50kJtRZutMsiD4aT382x11dsvGuqdeq3p7ukQuTGJAFe7IBWyYYFpC9Z7L S+gUDSYXxNqAZmGtNiHx1016pQsUa0KzOLDiPE6RLvv68TD+CkRlz3IWNZzgl9USdmnN z+InMkrWIcAmmZPneu+fLlWr4gQmiqhskkv4MYop0/0FIXMSQZEgKGg2n/N4i0AT9eA5 pmFekXzY3lbaxfTO1SWTHRr/ApYGM9kcmlEFuRFpyDcGrChamnKxWxerxQJNCJBfiN2G y8gw== X-Gm-Message-State: AOAM533wRMYef/Ww2bdV8Lkd1mCZtvUsQIr6pzXYW1NqyTqFZFwm2iQ5 JLI0SVH+3DgSNw1Un7F/p1E= X-Received: by 2002:a17:90a:bc91:: with SMTP id x17mr877039pjr.113.1603436286598; Thu, 22 Oct 2020 23:58:06 -0700 (PDT) Received: from nick-Blade-Stealth.lan ([2600:1700:6d11:6f:140b:65b9:cfba:15d7]) by smtp.googlemail.com with ESMTPSA id v199sm875573pfc.149.2020.10.22.23.58.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2020 23:58:05 -0700 (PDT) From: Nick Desaulniers To: Andrew Morton Cc: Christoph Hellwig , Nick Desaulniers , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] bdi: fix -Wformat-security Date: Thu, 22 Oct 2020 23:57:54 -0700 Message-Id: <20201023065754.83084-1-nick.desaulniers@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org mm/backing-dev.c:810:57: warning: format string is not a string literal (potentially insecure) [-Wformat-security] dev = device_create(bdi_class, NULL, MKDEV(0, 0), bdi, bdi->dev_name); ^~~~~~~~~~~~~ Signed-off-by: Nick Desaulniers --- Example patch showing off kernel development from a newly created twitch stream! Check it out at: https://twitch.tv/ndesaulniers. mm/backing-dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/backing-dev.c b/mm/backing-dev.c index 408d5051d05b..5755578d671d 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c @@ -807,7 +807,7 @@ int bdi_register_va(struct backing_dev_info *bdi, const char *fmt, va_list args) return 0; vsnprintf(bdi->dev_name, sizeof(bdi->dev_name), fmt, args); - dev = device_create(bdi_class, NULL, MKDEV(0, 0), bdi, bdi->dev_name); + dev = device_create(bdi_class, NULL, MKDEV(0, 0), bdi, "%s", bdi->dev_name); if (IS_ERR(dev)) return PTR_ERR(dev); -- 2.25.1