@@ -2784,7 +2784,7 @@ arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, arc_done_func_t *done,
2784
2784
const zbookmark_t * zb )
2785
2785
{
2786
2786
arc_buf_hdr_t * hdr ;
2787
- arc_buf_t * buf ;
2787
+ arc_buf_t * buf = NULL ;
2788
2788
kmutex_t * hash_lock ;
2789
2789
zio_t * rzio ;
2790
2790
uint64_t guid = spa_load_guid (spa );
@@ -2866,7 +2866,7 @@ arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, arc_done_func_t *done,
2866
2866
uint64_t size = BP_GET_LSIZE (bp );
2867
2867
arc_callback_t * acb ;
2868
2868
vdev_t * vd = NULL ;
2869
- uint64_t addr ;
2869
+ uint64_t addr = 0 ;
2870
2870
boolean_t devw = B_FALSE ;
2871
2871
2872
2872
if (hdr == NULL ) {
@@ -2981,6 +2981,10 @@ arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, arc_done_func_t *done,
2981
2981
cb -> l2rcb_zb = * zb ;
2982
2982
cb -> l2rcb_flags = zio_flags ;
2983
2983
2984
+ ASSERT (addr >= VDEV_LABEL_START_SIZE &&
2985
+ addr + size < vd -> vdev_psize -
2986
+ VDEV_LABEL_END_SIZE );
2987
+
2984
2988
/*
2985
2989
* l2arc read. The SCL_L2ARC lock will be
2986
2990
* released by l2arc_read_done().
@@ -3172,8 +3176,8 @@ arc_release(arc_buf_t *buf, void *tag)
3172
3176
if (l2hdr ) {
3173
3177
mutex_enter (& l2arc_buflist_mtx );
3174
3178
hdr -> b_l2hdr = NULL ;
3175
- buf_size = hdr -> b_size ;
3176
3179
}
3180
+ buf_size = hdr -> b_size ;
3177
3181
3178
3182
/*
3179
3183
* Do we have more than one buf?
@@ -4172,7 +4176,7 @@ l2arc_read_done(zio_t *zio)
4172
4176
static list_t *
4173
4177
l2arc_list_locked (int list_num , kmutex_t * * lock )
4174
4178
{
4175
- list_t * list ;
4179
+ list_t * list = NULL ;
4176
4180
4177
4181
ASSERT (list_num >= 0 && list_num <= 3 );
4178
4182
0 commit comments