From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754689AbbIINjm (ORCPT ); Wed, 9 Sep 2015 09:39:42 -0400 Received: from mail-yk0-f171.google.com ([209.85.160.171]:36443 "EHLO mail-yk0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751909AbbIINje (ORCPT ); Wed, 9 Sep 2015 09:39:34 -0400 Date: Wed, 9 Sep 2015 09:39:28 -0400 From: Tejun Heo To: Maurizio Lombardi Cc: akpm@linux-foundation.org, linux@rasmusvillemoes.dk, linux-kernel@vger.kernel.org Subject: Re: [PATCH] lib/vsprintf.c: increase the size of the field_width variable Message-ID: <20150909133928.GA22909@mtj.duckdns.org> References: <1441793590-23856-1-git-send-email-mlombard@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1441793590-23856-1-git-send-email-mlombard@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 09, 2015 at 12:13:10PM +0200, Maurizio Lombardi wrote: > When printing a bitmap using the "%*pb[l]" printk format > a 16 bit variable (field_width) is used to store the size of the bitmap. > In some cases 16 bits are not sufficient, the variable overflows and > printk does not work as expected. > > This patch fixes the problem by changing the type of field_width to s32. > > How to reproduce the bug: > > 1.load scsi_debug > # modprobe scsi-debug dev_size_mb=256 lbpu=1 lbpws10=1 > > 2.create VG > # vgcreate tsvg /dev/sdb > Physical volume "/dev/sdb" successfully created > Volume group "tsvg" successfully created > > 3. Bitmap should be set, but still empty > # cat /sys/bus/pseudo/drivers/scsi_debug/map > > Expected results: > # cat /sys/bus/pseudo/drivers/scsi_debug/map > 0-15 > > Signed-off-by: Maurizio Lombardi Acked-by: Tejun Heo Thanks. -- tejun