imitheos Δημοσ. 5 Ιουλίου 2013 Μέλος Δημοσ. 5 Ιουλίου 2013 Απάντησαν τελικά στο e-mail; Μπας και εχει αλλη συμπεριφορα οταν γραφουν σε kernel mode; Οπως πχ με τους registers που σε kernel mode ειναι ολοκληρη ενω σε user mode ειναι μιση commit 2ee3e26c673e75c05ef8b914f54fadee3d7b9c88 Author: Ben Hutchings <[email protected]> Date: Mon May 27 19:07:19 2013 +0100 [SCSI] sd: Fix parsing of 'temporary ' cache mode prefix Commit 39c60a0948cc '[SCSI] sd: fix array cache flushing bug causing performance problems' added temp as a pointer to "temporary " and used sizeof(temp) - 1 as its length. But sizeof(temp) is the size of the pointer, not the size of the string constant. Change temp to a static array so that sizeof() does what was intended. Signed-off-by: Ben Hutchings <[email protected]> Cc: [email protected] Signed-off-by: James Bottomley <[email protected]> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index a37eda9..91e8a95 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -142,7 +142,7 @@ sd_store_cache_type(struct device *dev, struct device_attribute *attr, char *buffer_data; struct scsi_mode_data data; struct scsi_sense_hdr sshdr; - const char *temp = "temporary "; + static const char temp[] = "temporary "; int len; if (sdp->type != TYPE_DISK) Δεν ήμασταν ελέφαντες τελικά. Χτες έγινε ένα merge στο tree του linus που περιείχε και το παραπάνω fix. 3
pmav99 Δημοσ. 5 Ιουλίου 2013 Δημοσ. 5 Ιουλίου 2013 Για ακόμα μία φορά η επιβεβαίωση του Linus' Law http://en.wikipedia.org/wiki/Linus%27s_Law
Προτεινόμενες αναρτήσεις
Δημιουργήστε ένα λογαριασμό ή συνδεθείτε για να σχολιάσετε
Πρέπει να είστε μέλος για να αφήσετε σχόλιο
Δημιουργία λογαριασμού
Εγγραφείτε με νέο λογαριασμό στην κοινότητα μας. Είναι πανεύκολο!
Δημιουργία νέου λογαριασμούΣύνδεση
Έχετε ήδη λογαριασμό; Συνδεθείτε εδώ.
Συνδεθείτε τώρα