On Sun, Oct 30, 2022 at 06:05:35PM -0500, Mike Christie wrote:
> The problem I hit is that in the ioctl code I then have to do:
>
> @@ -269,7 +270,14 @@ static int blkdev_pr_register(struct block_device *bdev,
>
> if (reg.flags & ~PR_FL_IGNORE_KEY)
> return -EOPNOTSUPP;
> -
On Mon, Oct 31, 2022 at 09:52:04AM +0800, Yu Kuai wrote:
>> INIT_LIST_HEAD(&holder->list);
>> -holder->bdev = bdev;
>> holder->refcnt = 1;
>> +holder->holder_dir = kobject_get(bdev->bd_holder_dir);
>
> I wonder is this safe here, if kobject reference is 0 here and
> bd_holder_dir
On Tue, Nov 01, 2022 at 07:12:51PM +0800, Yu Kuai wrote:
>> But how could the reference be 0 here? The driver that calls
>> bd_link_disk_holder must have the block device open and thus hold a
>> reference to it.
>
> Like I said before, the caller of bd_link_disk_holder() get bdev by
> blkdev_get_b
On Tue, Nov 01, 2022 at 07:28:17PM +0800, Yu Kuai wrote:
> What if bd_holder_dir is already freed here, then uaf can be triggered.
> Thus bd_holder_dir need to be resed in del_gendisk() if it's reference
> is dropped to 0, however, kobject apis can't do that...
Indeed. I don't think we can simply
__list_versions will first estimate the required space using the
"dm_target_iterate(list_version_get_needed, &needed)" call and then will
fill the space using the "dm_target_iterate(list_version_get_info,
&iter_info)" call. Each of these calls locks the targets using the
"down_read(&_lock)" and "up
This is a small code cleanup in list_version_get_info. We don't need to
modify info->vers if we overwrite it immediatelly.
Signed-off-by: Mikulas Patocka
---
drivers/md/dm-ioctl.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6/drivers/md/dm-ioctl.c
==
Change the ioctl codes from DM_DEV_ARM_POLL to DM_DEV_ARM_POLL_CMD and
from DM_GET_TARGET_VERSION to DM_GET_TARGET_VERSION_CMD.
Note that the "cmd" field of "struct _ioctls" is never used, thus this
patch doesn't fix any bug, it just makes the code consistent.
Signed-off-by: Mikulas Patocka
---
This patch enables support for feature strings that may be returned from
the kernel to userspace and may be used instead of version numbers to
determine if the kernel supports a particular feature.
So far, all the strings are empty. When new features will be introduced,
they will be added to the d
On Sun, Oct 30, 2022 at 05:31:43PM +0800, Shiyang Ruan wrote:
>
>
> 在 2022/10/28 9:37, Dan Williams 写道:
> > Darrick J. Wong wrote:
> > > [add tytso to cc since he asked about "How do you actually /get/ fsdax
> > > mode these days?" this morning]
> > >
> > > On Tue, Oct 25, 2022 at 10:56:19AM -07
Hi,
I happened to notice the following QEMU bug report:
https://gitlab.com/qemu-project/qemu/-/issues/1290
I believe it's a regression from the following kernel commit:
commit b1a000d3b8ec582da64bb644be633e5a0beffcbf
Author: Keith Busch
Date: Fri Jun 10 12:58:29 2022 -0700
在 2022/11/2 8:45, Darrick J. Wong 写道:
> On Sun, Oct 30, 2022 at 05:31:43PM +0800, Shiyang Ruan wrote:
>>
>>
>> 在 2022/10/28 9:37, Dan Williams 写道:
>>> Darrick J. Wong wrote:
[add tytso to cc since he asked about "How do you actually /get/ fsdax
mode these days?" this morning]
O
For gendisk that are not live or their partitions, the bd_holder_dir
pointer is not valid and the kobject might not have been allocated
yet or freed already. Check that the disk is live before creating the
linkage and error out otherwise.
Signed-off-by: Christoph Hellwig
---
block/holder.c | 5
12 matches
Mail list logo