Description: Allow masking D_WARNING, D_ERROR messages from console
Details : Console messages can now be disabled via lnet.printk.
+Severity : normal
+Bugzilla : 14614
+Description: User code with malformed file open parameter crashes client node
+Details : Before packing join_file req, all the related reference should be
+ checked carefully in case some malformed flags cause fake
+ join_file req on client.
+
--------------------------------------------------------------------------------
2007-12-07 Cluster File Systems, Inc. <info@clusterfs.com>
mode = LCK_CR;
count += mdc_resource_get_unused(exp, &data->fid1, &cancels, mode,
MDS_INODELOCK_UPDATE);
- if (it->it_flags & O_JOIN_FILE) {
+ if (it->it_flags & O_JOIN_FILE && data->data) {
__u64 head_size = (*(__u64 *)data->data);
/* join is like an unlink of the tail */
size[DLM_INTENT_REC_OFF + 3] = sizeof(struct mds_rec_join);
}
strncpy(cloned_flags, optarg, strlen(optarg)+1);
+ flags = atoi(cloned_flags);
+ if (flags > 0) {
+ flag_set = 1;
+#ifdef DEBUG
+ printf("flags = %d\n",flags);
+#endif
+ break;
+ } else
+ flags = 0;
+
for (tmp = strtok(cloned_flags, ":|"); tmp;
tmp = strtok(NULL, ":|")) {
int i = 0;
}
run_test 33a "test open file(mode=0444) with O_RDWR (should return error)"
+test_33b() {
+ rm -fr $DIR/d33
+ mkdir -p $DIR/d33
+ chown $RUNAS_ID $DIR/d33
+ $RUNAS $OPENFILE -f 1286739555 $DIR/d33/f33 && error "create" || true
+}
+run_test 33b "test open file with malformed flags (No panic and return error)"
+
TEST_34_SIZE=${TEST_34_SIZE:-2000000000000}
test_34a() {
rm -f $DIR/f34