lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210730072707.GA23847@lst.de>
Date:   Fri, 30 Jul 2021 09:27:07 +0200
From:   Christoph Hellwig <hch@....de>
To:     Nathan Chancellor <nathan@...nel.org>
Cc:     FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        Christoph Hellwig <hch@....de>, linux-scsi@...r.kernel.org,
        linux-kernel@...r.kernel.org, kernel test robot <lkp@...el.com>
Subject: Re: [PATCH] bsg: Fix build error with CONFIG_BLK_DEV_BSG_COMMON=m

On Thu, Jul 29, 2021 at 06:21:08PM -0700, Nathan Chancellor wrote:
> When CONFIG_BLK_DEV_BSG_COMMON is enabled as a module, which can happen
> when CONFIG_SCSI=m and CONFIG_BLK_DEV_BSGLIB=n, the following error
> occurs:
> 
> In file included from arch/x86/kernel/asm-offsets.c:13:
> In file included from include/linux/suspend.h:5:
> In file included from include/linux/swap.h:9:
> In file included from include/linux/memcontrol.h:22:
> In file included from include/linux/writeback.h:14:
> In file included from include/linux/blk-cgroup.h:23:
> include/linux/blkdev.h:539:26: error: field has incomplete type 'struct
> bsg_class_device'
>         struct bsg_class_device bsg_dev;
>                                 ^
> include/linux/blkdev.h:539:9: note: forward declaration of 'struct
> bsg_class_device'
>         struct bsg_class_device bsg_dev;
>                ^
> 1 error generated.
> 
> The definition of struct bsg_class_device is kept under an #ifdef
> directive, which does not work when CONFIG_BLK_DEV_BSG_COMMON is a
> module, as the define is CONFIG_BLK_DEV_BSG_COMMON_MODULE.
> 
> Use IS_ENABLED instead, which evaluates to 1 when
> CONFIG_BLK_DEV_BSG_COMMON is y or m.
> 
> Fixes: 78011042684d ("scsi: bsg: Move bsg_scsi_ops to drivers/scsi/")
> Reported-by: kernel test robot <lkp@...el.com>
> Signed-off-by: Nathan Chancellor <nathan@...nel.org>

Looks fine.  Although I have a larger series pending here:

https://lore.kernel.org/linux-scsi/20210729064845.1044147-1-hch@lst.de/T/#t

that should also fix this issue as a byproduct.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ