Re: [PATCH] fix potential null pointer deref in quota

From: Jan Kara
Date: Mon Mar 20 2006 - 04:48:33 EST


Hello,

> The coverity checker noticed that we may pass a NULL super_block to
> do_quotactl() that dereferences it.
> Dereferencing NULL pointers is bad medicine, better check and fail
> gracefully.
Umm, when do you think we can dereference NULL pointer to a super_block?
check_quotactl_valid() allows sb==NULL only in the case of Q_SYNC command.
And that is handled in do_quotactl() correctly even if sb==NULL...

Honza

--
Jan Kara <jack@xxxxxxx>
SuSE CR Labs
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/