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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 29 Dec 2011 20:06:32 +0300
From:	Maxim Patlasov <maxim.patlasov@...il.com>
To:	psusi@....rr.com
Cc:	vgoyal@...hat.com, joe@...ches.com, kzak@...hat.com,
	linux-kernel@...r.kernel.org, jaxboe@...ionio.com
Subject: Re: [PATCH 1/2] Add partition resize function to BLKPG ioctl

Phillip,

The patch seems to have some problems:

1. Typo in part_nr_sects_write_begin:

> +	write_seqcount_begin(&seq);

It should be write_seqcount_begin(seq). Similar issue in
part_nr_sects_write_end().

2. part_nr_sects_write_begin/end is never called.

3. part->seq should be initialized with seqcount_init().

Btw, do we really need both part_nr_sects_write_begin and
part_nr_sects_write_end? What about:

#if BITS_PER_LONG == 32 && defined(CONFIG_LBDAF)
static inline void part_nr_sects_write(struct hd_struct *part,
sector_t nr_sects)
{
        write_seqcount_begin(&part->seq);
        part->nr_sects = nr_sects;
        write_seqcount_end(&part->seq);
}
#else
static inline void part_nr_sects_write(struct hd_struct *part,
sector_t nr_sects)
{
        part->nr_sects = nr_sects;
}
#endif

and use part_nr_sects_write(part, length) instead of part->nr_sects =
length in case BLKPG_RESIZE_PARTITION?

Thanks,
Maxim
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ