We never checked for errors on add_disk() as this function
returned void. Now that this is fixed, use the shiny new
error handling.
Reviewed-by: Geert Uytterhoeven
Acked-by: Geert Uytterhoeven
Signed-off-by: Luis Chamberlain
---
arch/m68k/emu/nfblock.c | 9 +++--
1 file changed, 7
We never checked for errors on add_disk() as this function
returned void. Now that this is fixed, use the shiny new
error handling.
ubd_disk_register() never returned an error, so just fix
that now and let the caller handle the error condition.
Reviewed-by: Gabriel Krisman Bertazi
We never checked for errors on add_disk() as this function
returned void. Now that this is fixed, use the shiny new
error handling.
There are two calls to dm_setup_md_queue() which can fail then,
one on dm_early_create() and we can easily see that the error path
there calls dm_destroy in the
We never checked for errors on add_disk() as this function
returned void. Now that this is fixed, use the shiny new
error handling.
Just put the cdrom kref and have the unwinding be done by
sr_kref_release().
Reviewed-by: Christoph Hellwig
Signed-off-by: Luis Chamberlain
---
drivers/scsi/sr.c
We never checked for errors on add_disk() as this function
returned void. Now that this is fixed, use the shiny new
error handling.
As with the error handling for device_add() we follow the same
logic and just put the device so that cleanup is done via the
scsi_disk_release().
Reviewed-by:
We never checked for errors on add_disk() as this function
returned void. Now that this is fixed, use the shiny new
error handling.
This driver doesn't do any unwinding with blk_cleanup_disk()
even on errors after add_disk() and so we follow that
tradition.
Acked-by: Coly Li
Signed-off-by: Luis
We never checked for errors on add_disk() as this function
returned void. Now that this is fixed, use the shiny new
error handling.
Acked-by: Jack Wang
Signed-off-by: Luis Chamberlain
---
drivers/block/rnbd/rnbd-clt.c | 13 +
1 file changed, 9 insertions(+), 4 deletions(-)
diff
Jens,
I had last split up patches into 7 groups, but at this point now
most changes are merged except a few more drivers. Instead of creating
a new patch set for each of the 7 groups I'm creating 3 new groups of
patches now:
* This set, for which we already have an Acked-by or Reviewed-by tag,
We never checked for errors on device_add_disk() as this function
returned void. Now that this is fixed, use the shiny new error
handling. The function xlvbd_alloc_gendisk() typically does the
unwinding on error on allocating the disk and creating the tag,
but since all that error handling was
Hi Linus,
The following changes since commit 64570fbc14f8d7cb3fe3995f20e26bc25ce4b2cc:
Linux 5.15-rc5 (2021-10-10 17:01:59 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git
tags/for-5.15/dm-fixes
for you to fetch
On Fri, Oct 15, 2021 at 12:25:53PM -0700, Deven Bowers wrote:
>
> On 10/13/2021 12:24 PM, Eric Biggers wrote:
> > On Wed, Oct 13, 2021 at 12:06:31PM -0700, deven.de...@linux.microsoft.com
> > wrote:
> > > From: Fan Wu
> > >
> > > Add security_inode_setsecurity to fsverity signature
On 10/15/21 12:25 PM, Deven Bowers wrote:
On 10/13/2021 3:54 PM, Randy Dunlap wrote:
Hi,
On 10/13/21 12:06 PM, deven.de...@linux.microsoft.com wrote:
diff --git a/security/ipe/Kconfig b/security/ipe/Kconfig
index c4503083e92d..ef556b66e674 100644
--- a/security/ipe/Kconfig
+++
On 10/13/2021 12:24 PM, Eric Biggers wrote:
On Wed, Oct 13, 2021 at 12:06:31PM -0700, deven.de...@linux.microsoft.com wrote:
From: Fan Wu
Add security_inode_setsecurity to fsverity signature verification.
This can let LSMs save the signature data and digest hashes provided
by fsverity.
Can
On 10/13/2021 1:04 PM, Casey Schaufler wrote:
On 10/13/2021 12:06 PM, deven.de...@linux.microsoft.com wrote:
From: Deven Bowers
IPE's initial goal is to control both execution and the loading of
kernel modules based on the system's definition of trust. It
accomplishes this by plugging into
On 10/13/2021 3:54 PM, Randy Dunlap wrote:
Hi,
On 10/13/21 12:06 PM, deven.de...@linux.microsoft.com wrote:
diff --git a/security/ipe/Kconfig b/security/ipe/Kconfig
index c4503083e92d..ef556b66e674 100644
--- a/security/ipe/Kconfig
+++ b/security/ipe/Kconfig
@@ -17,3 +17,55 @@ menuconfig
On 10/13/2021 1:02 PM, Steve Grubb wrote:
Hello,
On Wednesday, October 13, 2021 3:06:26 PM EDT deven.de...@linux.microsoft.com
wrote:
Users of IPE require a way to identify when and why an operation fails,
allowing them to both respond to violations of policy and be notified
of potentially
On Fri, Oct 15, 2021 at 03:26:25PM +0200, Christoph Hellwig wrote:
> Use the proper helper to read the block device size.
>
> Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
--
Kees Cook
--
dm-devel mailing list
dm-devel@redhat.com
On Fri, Oct 15, 2021 at 03:26:38PM +0200, Christoph Hellwig wrote:
> Add a helper to return the size of sb->s_bdev in sb->s_blocksize_bits
> based unites. Note that SECTOR_SHIFT has to be open coded due to
> include dependency issues for now, but I have a plan to sort that out
> eventually.
>
>
On Fri, Oct 15, 2021 at 03:26:37PM +0200, Christoph Hellwig wrote:
> Use the proper helper to read the block device size.
>
> Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
--
Kees Cook
--
dm-devel mailing list
dm-devel@redhat.com
On Fri, Oct 15, 2021 at 03:26:36PM +0200, Christoph Hellwig wrote:
> Use the proper helper to read the block device size.
>
> Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
--
Kees Cook
--
dm-devel mailing list
dm-devel@redhat.com
On Fri, Oct 15, 2021 at 03:26:35PM +0200, Christoph Hellwig wrote:
> Use the proper helper to read the block device size and remove two
> cargo culted checks that can't be false.
>
> Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
--
Kees Cook
--
dm-devel mailing list
On Fri, Oct 15, 2021 at 03:26:34PM +0200, Christoph Hellwig wrote:
> Use the proper helper to read the block device size.
>
> Signed-off-by: Christoph Hellwig
Thanks for the bdev_by_bytes() helper; this is more readable now. :)
Acked-by: Kees Cook
--
Kees Cook
--
dm-devel mailing list
On Fri, Oct 15, 2021 at 03:26:33PM +0200, Christoph Hellwig wrote:
> Use the proper helper to read the block device size.
>
> Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
--
Kees Cook
--
dm-devel mailing list
dm-devel@redhat.com
On Fri, Oct 15, 2021 at 03:26:32PM +0200, Christoph Hellwig wrote:
> Use the proper helper to read the block device size.
>
> Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
--
Kees Cook
--
dm-devel mailing list
dm-devel@redhat.com
On Fri, Oct 15, 2021 at 03:26:31PM +0200, Christoph Hellwig wrote:
> Use the proper helper to read the block device size.
>
> Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
--
Kees Cook
--
dm-devel mailing list
dm-devel@redhat.com
On Fri, Oct 15, 2021 at 03:26:30PM +0200, Christoph Hellwig wrote:
> Use the proper helper to read the block device size.
>
> Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
--
Kees Cook
--
dm-devel mailing list
dm-devel@redhat.com
On Fri, Oct 15, 2021 at 03:26:26PM +0200, Christoph Hellwig wrote:
> Use the proper helper to read the block device size.
>
> Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
--
Kees Cook
--
dm-devel mailing list
dm-devel@redhat.com
On Fri, Oct 15, 2021 at 03:26:22PM +0200, Christoph Hellwig wrote:
> Use the proper helper to read the block device size.
>
> Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
--
Kees Cook
--
dm-devel mailing list
dm-devel@redhat.com
On Fri, Oct 15, 2021 at 03:26:21PM +0200, Christoph Hellwig wrote:
> Use the proper helper to read the block device size.
>
> Signed-off-by: Christoph Hellwig
> Reviewed-by: Chaitanya Kulkarni
Is this basically an open-coded non-sb version of sb_bdev_nr_blocks()?
Reviewed-by: Kees Cook
>
On Fri, Oct 15, 2021 at 02:37:41PM +, Anton Altaparmakov wrote:
> Hi Christoph,
>
> > On 15 Oct 2021, at 14:26, Christoph Hellwig wrote:
> >
> > Add a helpe to query the size of a block device in bytes. This
> > will be used to remove open coded access to ->bd_inode.
>
> Matthew already
On Fri, Oct 15, 2021 at 03:26:20PM +0200, Christoph Hellwig wrote:
> Use the proper helper to read the block device size.
>
> Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
--
Kees Cook
--
dm-devel mailing list
dm-devel@redhat.com
On Fri, Oct 15, 2021 at 03:26:14PM +0200, Christoph Hellwig wrote:
> Ensure these are always available for inlines in the various block layer
> headers.
>
> Signed-off-by: Christoph Hellwig
Awesome, yes. Thanks!
Reviewed-by: Kees Cook
--
Kees Cook
--
dm-devel mailing list
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
---
fs/affs/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/affs/super.c b/fs/affs/super.c
index c6c2a513ec92d..c609005a9eaaa 100644
--- a/fs/affs/super.c
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
Acked-by: Song Liu
---
drivers/md/md.c | 26 +++---
1 file changed, 11 insertions(+), 15 deletions(-)
diff --git a/drivers/md/md.c b/drivers/md/md.c
index
Hi Jens,
various drivers currently poke directy at the block device inode, which
is a bit of a mess. This series cleans up the places that read the
block device size to use the proper helpers. I have separate patches
for many of the other bd_inode uses, but this series is already big
enough
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
Reviewed-by: Chaitanya Kulkarni
---
drivers/block/drbd/drbd_int.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/block/drbd/drbd_int.h
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Jan Kara
Reviewed-by: Chaitanya Kulkarni
---
fs/buffer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/buffer.c b/fs/buffer.c
index c615387aedcae..156358977249f 100644
Use the equivalent block layer helper instead.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
Acked-by: Coly Li
---
drivers/md/bcache/super.c | 2 +-
drivers/md/bcache/util.h | 4
drivers/md/bcache/writeback.c | 2 +-
3 files changed, 2 insertions(+), 6 deletions(-)
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
---
fs/hfsplus/wrapper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/hfsplus/wrapper.c b/fs/hfsplus/wrapper.c
index 0350dc7821bf9..51ae6f1eb4a55 100644
---
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Chaitanya Kulkarni
---
drivers/nvme/target/io-cmd-bdev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/nvme/target/io-cmd-bdev.c
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
---
fs/nilfs2/ioctl.c | 2 +-
fs/nilfs2/super.c | 2 +-
fs/nilfs2/the_nilfs.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/nilfs2/ioctl.c b/fs/nilfs2/ioctl.c
index
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
---
fs/cramfs/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c
index 2be65269a987c..666aa380011e0 100644
--- a/fs/cramfs/inode.c
+++
Use the proper helpers to read the block device size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
Acked-by: Mike Snitzer
---
drivers/md/dm-bufio.c | 2 +-
drivers/md/dm-cache-metadata.c | 2 +-
drivers/md/dm-cache-target.c| 2 +-
drivers/md/dm-clone-target.c| 2
Ensure these are always available for inlines in the various block layer
headers.
Signed-off-by: Christoph Hellwig
---
include/linux/blk_types.h | 17 +
include/linux/blkdev.h| 17 -
2 files changed, 17 insertions(+), 17 deletions(-)
diff --git
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Anand Jain
Reviewed-by: Chaitanya Kulkarni
---
fs/btrfs/dev-replace.c | 3 +--
fs/btrfs/disk-io.c | 2 +-
fs/btrfs/ioctl.c | 4 ++--
fs/btrfs/volumes.c | 8
4 files
On Fri, Oct 15, 2021 at 03:26:15PM +0200, Christoph Hellwig wrote:
> +static inline sector_t bdev_nr_bytes(struct block_device *bdev)
> +{
> + return i_size_read(bdev->bd_inode);
Uh. loff_t, surely?
--
dm-devel mailing list
dm-devel@redhat.com
Use the proper helper to read the block device size and remove two
cargo culted checks that can't be false.
Signed-off-by: Christoph Hellwig
Reviewed-by: Jan Kara
---
fs/reiserfs/super.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/reiserfs/super.c
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
---
fs/fat/inode.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index de0c9b013a851..9f3cd03668adc 100644
--- a/fs/fat/inode.c
Add a helpe to query the size of a block device in bytes. This
will be used to remove open coded access to ->bd_inode.
Signed-off-by: Christoph Hellwig
---
include/linux/genhd.h | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/include/linux/genhd.h
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
---
fs/hfs/mdb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/hfs/mdb.c b/fs/hfs/mdb.c
index cdf0edeeb2781..5beb826524354 100644
--- a/fs/hfs/mdb.c
+++
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
---
fs/ntfs3/super.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c
index 55bbc9200a10e..7ed2cb5e8b1d9 100644
--- a/fs/ntfs3/super.c
+++
No need to convert from bdev to inode and back.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
Reviewed-by: Jan Kara
---
fs/buffer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/buffer.c b/fs/buffer.c
index 156358977249f..46bc589b7a03c 100644
---
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Chaitanya Kulkarni
---
drivers/target/target_core_iblock.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/target/target_core_iblock.c
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
Acked-by: Dave Kleikamp
---
fs/jfs/resize.c | 2 +-
fs/jfs/super.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/jfs/resize.c b/fs/jfs/resize.c
index bde787c354fcc..a42dbb0d3d28a
On Fri 15-10-21 15:26:14, Christoph Hellwig wrote:
> Ensure these are always available for inlines in the various block layer
> headers.
>
> Signed-off-by: Christoph Hellwig
Looks good. Feel free to add:
Reviewed-by: Jan Kara
On Fri, Oct 15, 2021 at 02:35:15PM +0100, Matthew Wilcox wrote:
> On Fri, Oct 15, 2021 at 03:26:15PM +0200, Christoph Hellwig wrote:
> > +static inline sector_t bdev_nr_bytes(struct block_device *bdev)
> > +{
> > + return i_size_read(bdev->bd_inode);
>
> Uh. loff_t, surely?
Yes, that wuld be
Use the sb_bdev_nr_blocks helper instead of open coding it and clean up
ntfs_fill_super a bit by moving an assignment a little earlier that has
no negative side effects.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
---
fs/ntfs/super.c | 8 +++-
1 file changed, 3 insertions(+), 5
Use the sb_bdev_nr_blocks helper instead of open coding it.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
Reviewed-by: Jan Kara
---
fs/reiserfs/super.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index
Add a helper to return the size of sb->s_bdev in sb->s_blocksize_bits
based unites. Note that SECTOR_SHIFT has to be open coded due to
include dependency issues for now, but I have a plan to sort that out
eventually.
Signed-off-by: Christoph Hellwig
---
include/linux/genhd.h | 6 ++
1 file
Use the sb_bdev_nr_blocks helper instead of open coding it.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
Reviewed-by: Jan Kara
---
fs/udf/lowlevel.c | 5 ++---
fs/udf/super.c| 9 +++--
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/fs/udf/lowlevel.c
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
Acked-by: Phillip Lougher
---
fs/squashfs/super.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/squashfs/super.c b/fs/squashfs/super.c
index 60d6951915f44..bb44ff4c5cc67 100644
Use the sb_bdev_nr_blocks helper instead of open coding it.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
---
fs/jfs/resize.c | 3 +--
fs/jfs/super.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/jfs/resize.c b/fs/jfs/resize.c
index
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
---
fs/pstore/blk.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/fs/pstore/blk.c b/fs/pstore/blk.c
index 04ce58c939a0b..5d1fbaffd66a1 100644
--- a/fs/pstore/blk.c
+++
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
---
fs/nfs/blocklayout/dev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/nfs/blocklayout/dev.c b/fs/nfs/blocklayout/dev.c
index acb1d22907daf..5e56da748b2ab 100644
---
Use the sb_bdev_nr_blocks helper instead of open coding it.
Signed-off-by: Christoph Hellwig
Reviewed-by: Kees Cook
Reviewed-by: Jan Kara
Acked-by: Theodore Ts'o
---
fs/ext4/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index
Use the proper helper to read the block device size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Jan Kara
Reviewed-by: Chaitanya Kulkarni
---
block/fops.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/fops.c b/block/fops.c
index 7bb9581a146cf..a6a4d412720cd
On 10/14/21 4:32AM, Anton Altaparmakov wrote:
Hi Christoph,
On 14 Oct 2021, at 07:28, Christoph Hellwig wrote:
On Wed, Oct 13, 2021 at 07:10:13AM +0200, Christoph Hellwig wrote:
I wondered about adding a helper for looking at the size in byte units
to avoid the SECTOR_SHIFT shifts in
Hi Christoph,
> On 14 Oct 2021, at 07:28, Christoph Hellwig wrote:
>
> On Wed, Oct 13, 2021 at 07:10:13AM +0200, Christoph Hellwig wrote:
>> I wondered about adding a helper for looking at the size in byte units
>> to avoid the SECTOR_SHIFT shifts in various places. But given that
>> I could
68 matches
Mail list logo