Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137077524
D9496.id24884.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D9496.id24884.diff
View Options
Index: sys/boot/common/bcache.c
===================================================================
--- sys/boot/common/bcache.c
+++ sys/boot/common/bcache.c
@@ -224,13 +224,13 @@
caddr_t p_buf;
uint32_t *marker;
- marker = (uint32_t *)(bc->bcache_data + bc->bcache_nblks * bcache_blksize);
-
if (bc == NULL) {
errno = ENODEV;
return (-1);
}
+ marker = (uint32_t *)(bc->bcache_data + bc->bcache_nblks * bcache_blksize);
+
if (rsize != NULL)
*rsize = 0;
@@ -290,10 +290,9 @@
* And secondly, this way we get the most conservative setup for the ra.
*
* The selection of multiple of 16 blocks (8KB) is quite arbitrary, however,
- * we want to have the CD (2K) and the 4K disks to be covered.
- * Also, as we have 32 blocks to be allocated as the fallback value in the
- * bcache_allocate(), the 16 ra blocks will allow the read ahead
- * to be used even with bcache this small.
+ * we want to cover CDs (2K) and 4K disks.
+ * bcache_allocate() will always fall back to a minimum of 32 blocks.
+ * Our choice of 16 read ahead blocks will always fit inside the bcache.
*/
ra = bc->bcache_nblks - BHASH(bc, p_blk + p_size);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 22, 2:38 AM (12 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25879215
Default Alt Text
D9496.id24884.diff (1 KB)
Attached To
Mode
D9496: loader: possible NULL pointer dereference in bcache.c
Attached
Detach File
Event Timeline
Log In to Comment