Linux 2.6.27.45
I'm announcing the release of the 2.6.27.45 kernel. All users of the 2.6.27 kernel series are very strongly encouraged to upgrade.
The updated 2.6.27.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.27.y.git
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.27.y.git;a=summarythanks,
greg k-h
------------
Makefile | 2 +- arch/s390/kvm/intercept.c | 4 ++-- drivers/char/tty_io.c | 2 +- drivers/edac/i5000_edac.c | 8 +++++++- drivers/scsi/megaraid/megaraid_sas.c | 2 +- drivers/usb/core/hub.c | 3 +++ drivers/usb/host/ehci-hcd.c | 5 +++-- drivers/usb/host/ehci-hub.c | 20 +++++++++++++++++++- drivers/usb/host/ehci-q.c | 11 ++++++++--- drivers/usb/host/uhci-hcd.c | 15 ++++++++++++++- drivers/usb/host/uhci-hub.c | 2 +- fs/ecryptfs/crypto.c | 4 ++-- fs/ecryptfs/file.c | 14 +++++++------- fs/fcntl.c | 6 ++++-- fs/reiserfs/inode.c | 17 ++++++++++++++--- ipc/msg.c | 1 + ipc/sem.c | 1 + ipc/shm.c | 1 + 18 files changed, 90 insertions(+), 28 deletions(-)
Alan Stern (3):
USB: add missing delay during remote wakeup
USB: EHCI: fix handling of unusual interrupt intervals
USB: EHCI & UHCI: fix race between root-hub suspend and port resume
Bryn M. Reeves (1):
megaraid_sas: remove sysfs poll_mode_io world writeable permissions
Christian Borntraeger (1):
KVM: S390: fix potential array overrun in intercept handling
Dan Carpenter (1):
ecryptfs: use after free
Erez Zadok (1):
ecryptfs: initialize private persistent file before dereferencing pointer
Greg Kroah-Hartman (3):
tty: fix race in tty_fasync
fnctl: f_modown should call write_lock_irqsave/restore Linux 2.6.27.45
Jan Kara (1):
reiserfs: truncate blocks not used by a write
Serge E. Hallyn (1):
ipc ns: fix memory leak (idr)
Tamas Vincze (1):
edac: i5000_edac critical fix panic out of bounds
Makefile +1 -1
@@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 27 -EXTRAVERSION = .44 +EXTRAVERSION = .45 NAME = Trembling Tortoise # *DOCUMENTATION*
arch/s390/kvm/intercept.c +2 -2
@@ -199,7 +199,7 @@ static int handle_instruction_and_prog(struct kvm_vcpu *vcpu)return rc2; } -static const intercept_handler_t intercept_funcs[0x48 >>2 ] = { +static const intercept_handler_t intercept_funcs[] = { [0x00 >>2 ] = handle_noop, [0x04 >>2 ] = handle_instruction, [0x08 >>2 ] = handle_prog,
@@ -216,7 +216,7 @@ int kvm_handle_sie_intercept(struct kvm_vcpu *vcpu)intercept_handler_t func;u8 code = vcpu->arch.sie_block->icptcode; -if (code &3 || code >0x48 ) +if (code &3 || (code >>2 ) >=ARRAY_SIZE (intercept_funcs))return -ENOTSUPP ; func = intercept_funcs[code >>2 ];if (func)
drivers/char/tty_io.c +1 -1
@@ -2437,8 +2437,8 @@ static int tty_fasync(int fd, struct file *filp, int on) pid =task_pid (current); type =PIDTYPE_PID ; } -spin_unlock_irqrestore (&tty->ctrl_lock, flags); retval =__f_setown (filp, pid, type,0 ); +spin_unlock_irqrestore (&tty->ctrl_lock, flags);if (retval) goto out; }else {
drivers/edac/i5000_edac.c +7 -1
@@ -566,7 +566,13 @@ static void i5000_process_nonfatal_error_info(struct mem_ctl_info *mci,debugf0 ("\tUncorrected bits= 0x%x\n" , ue_errors); branch =EXTRACT_FBDCHAN_INDX (info->ferr_nf_fbd); - channel = branch; + +/* +* According with i5000 datasheet, bit 28 has no significance +* for errors M4Err-M12Err and M17Err-M21Err, on FERR_NF_FBD +*/ + channel = branch &2 ; + bank =NREC_BANK (info->nrecmema); rank =NREC_RANK (info->nrecmema); rdwr =NREC_RDWR (info->nrecmema);
drivers/scsi/megaraid/megaraid_sas.c +1 -1
@@ -3462,7 +3462,7 @@ out:return retval; } -static DRIVER_ATTR(poll_mode_io, S_IRUGO|S_IWUGO, +static DRIVER_ATTR(poll_mode_io, S_IRUGO|S_IWUSR, megasas_sysfs_show_poll_mode_io, megasas_sysfs_set_poll_mode_io);
drivers/usb/core/hub.c +3 -0
@@ -3015,6 +3015,9 @@ static void hub_events(void) USB_PORT_FEAT_C_SUSPEND); udev = hdev->children[i-1 ];if (udev) { +/* TRSMRCY = 10 msec */ +msleep (10 ); +usb_lock_device (udev); ret =remote_wakeup (hdev-> children[i-1 ]);
drivers/usb/host/ehci-hcd.c +3 -2
@@ -723,9 +723,10 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)/* start 20 msec resume signaling from this port, * and make khubd collect PORT_STAT_C_SUSPEND to -* stop that signaling. +* stop that signaling. Use 5 ms extra for safety, +* like usb_port_resume() does. */ - ehci->reset_done [i] = jiffies +msecs_to_jiffies (20 ); + ehci->reset_done[i] = jiffies +msecs_to_jiffies (25 );ehci_dbg (ehci,"port %d remote wakeup\n" , i +1 );mod_timer (&hcd->rh_timer, ehci->reset_done[i]); }
drivers/usb/host/ehci-hub.c +19 -1
@@ -119,9 +119,26 @@ static int ehci_bus_suspend (struct usb_hcd *hcd)del_timer_sync (&ehci->watchdog);del_timer_sync (&ehci->iaa_watchdog); - port =HCS_N_PORTS (ehci->hcs_params);spin_lock_irq (&ehci->lock); +/* Once the controller is stopped, port resumes that are already +* in progress won't complete. Hence if remote wakeup is enabled +* for the root hub and any ports are in the middle of a resume or +* remote wakeup, we must fail the suspend. +*/ +if (hcd->self.root_hub->do_remote_wakeup) { + port =HCS_N_PORTS (ehci->hcs_params); +while (port--) { +if (ehci->reset_done[port] !=0 ) { +spin_unlock_irq (&ehci->lock); +ehci_dbg (ehci,"suspend failed because " +"port %d is resuming\n" , + port +1 ); +return -EBUSY ; + } + } + } +/* stop schedules, clean any completed work */ if (HC_IS_RUNNING (hcd->state)) {ehci_quiesce (ehci);
@@ -137,6 +154,7 @@ static int ehci_bus_suspend (struct usb_hcd *hcd)*/ ehci->bus_suspended =0 ; ehci->owned_ports =0 ; + port =HCS_N_PORTS (ehci->hcs_params);while (port--) {u32 __iomem *reg = &ehci->regs->port_status [port];u32 t1 =ehci_readl (ehci, reg) & ~PORT_RWC_BITS ;
drivers/usb/host/ehci-q.c +8 -3
@@ -748,9 +748,10 @@ qh_make (* But interval 1 scheduling is simpler, and * includes high bandwidth. */ -dbg ("intr period %d uframes, NYET!" , - urb->interval); - goto done; + urb->interval =1 ; + }else if (qh->period > ehci->periodic_size) { + qh->period = ehci->periodic_size; + urb->interval = qh->period <<3 ; } }else {int think_time;
@@ -773,6 +774,10 @@ qh_make (usb_calc_bus_time (urb->dev->speed, is_input, 0, max_packet (maxp))); qh->period = urb->interval; +if (qh->period > ehci->periodic_size) { + qh->period = ehci->periodic_size; + urb->interval = qh->period; + } } }
drivers/usb/host/uhci-hcd.c +14 -1
@@ -750,7 +750,20 @@ static int uhci_rh_suspend(struct usb_hcd *hcd)spin_lock_irq (&uhci->lock);if (!test_bit (HCD_FLAG_HW_ACCESSIBLE , &hcd->flags)) rc = -ESHUTDOWN ; -else if (!uhci->dead) +else if (uhci->dead) + ;/* Dead controllers tell no tales */ + +/* Once the controller is stopped, port resumes that are already +* in progress won't complete. Hence if remote wakeup is enabled +* for the root hub and any ports are in the middle of a resume or +* remote wakeup, we must fail the suspend. +*/ +else if (hcd->self.root_hub->do_remote_wakeup && + uhci->resuming_ports) { +dev_dbg (uhci_dev (uhci),"suspend failed because a port " +"is resuming\n" ); + rc = -EBUSY ; + }else suspend_rh (uhci,UHCI_RH_SUSPENDED );spin_unlock_irq (&uhci->lock);return rc;
drivers/usb/host/uhci-hub.c +1 -1
@@ -167,7 +167,7 @@ static void uhci_check_ports(struct uhci_hcd *uhci)/* Port received a wakeup request */ set_bit (port, &uhci->resuming_ports); uhci->ports_timeout = jiffies + -msecs_to_jiffies (20 ); +msecs_to_jiffies (25 );/* Make sure we see the port again * after the resuming period is over. */
fs/ecryptfs/crypto.c +2 -2
@@ -1733,7 +1733,7 @@ ecryptfs_process_key_cipher(struct crypto_blkcipher **key_tfm, char *cipher_name, size_t *key_size) { char dummy_key[ECRYPTFS_MAX_KEY_BYTES]; -char *full_alg_name; +char *full_alg_name =NULL ;int rc; *key_tfm =NULL ;
@@ -1748,7 +1748,6 @@ ecryptfs_process_key_cipher(struct crypto_blkcipher **key_tfm,if (rc) goto out; *key_tfm =crypto_alloc_blkcipher (full_alg_name,0 ,CRYPTO_ALG_ASYNC ); -kfree (full_alg_name);if (IS_ERR (*key_tfm)) { rc =PTR_ERR (*key_tfm); printk(KERN_ERR "Unable to allocate crypto cipher with name "
@@ -1770,6 +1769,7 @@ ecryptfs_process_key_cipher(struct crypto_blkcipher **key_tfm, goto out; } out: +kfree (full_alg_name);return rc; }
fs/ecryptfs/file.c +7 -7
@@ -192,13 +192,6 @@ static int ecryptfs_open(struct inode *inode, struct file *file) | ECRYPTFS_ENCRYPTED); }mutex_unlock (&crypt_stat->cs_mutex); -if ((ecryptfs_inode_to_private (inode)->lower_file->f_flags &O_RDONLY ) - && !(file->f_flags &O_RDONLY )) { - rc = -EPERM ; -printk (KERN_WARNING "%s: Lower persistent file is RO; eCryptfs " -"file must hence be opened RO\n" , __func__); - goto out; - }if (!ecryptfs_inode_to_private (inode)->lower_file) { rc =ecryptfs_init_persistent_file (ecryptfs_dentry);if (rc) {
@@ -209,6 +202,13 @@ static int ecryptfs_open(struct inode *inode, struct file *file) goto out; } } +if ((ecryptfs_inode_to_private (inode)->lower_file->f_flags &O_RDONLY ) + && !(file->f_flags &O_RDONLY )) { + rc = -EPERM ; +printk (KERN_WARNING "%s: Lower persistent file is RO; eCryptfs " +"file must hence be opened RO\n" , __func__); + goto out; + }ecryptfs_set_file_lower ( file,ecryptfs_inode_to_private (inode)->lower_file);if (S_ISDIR (ecryptfs_dentry->d_inode->i_mode)) {
fs/fcntl.c +4 -2
@@ -200,7 +200,9 @@ static int setfl(int fd, struct file * filp, unsigned long arg)static void f_modown (struct file *filp,struct pid *pid,enum pid_type type,uid_t uid,uid_t euid,int force) { -write_lock_irq (&filp->f_owner.lock); +unsigned long flags; + +write_lock_irqsave (&filp->f_owner.lock, flags);if (force || !filp->f_owner.pid) {put_pid (filp->f_owner.pid); filp->f_owner.pid =get_pid (pid);
@@ -208,7 +210,7 @@ static void f_modown(struct file *filp, struct pid *pid, enum pid_type type, filp->f_owner.uid = uid; filp->f_owner.euid = euid; } -write_unlock_irq (&filp->f_owner.lock); +write_unlock_irqrestore (&filp->f_owner.lock, flags); } int __f_setown(struct file *filp, struct pid *pid, enum pid_type type,
fs/reiserfs/inode.c +14 -3
@@ -2545,6 +2545,12 @@ static int reiserfs_writepage(struct page *page, struct writeback_control *wbc)return reiserfs_write_full_page (page, wbc); } +static void reiserfs_truncate_failed_write (struct inode *inode) +{ +truncate_inode_pages (inode->i_mapping, inode->i_size); +reiserfs_truncate_file (inode,0 ); +} + static int reiserfs_write_begin(struct file *file, struct address_space *mapping, loff_t pos, unsigned len, unsigned flags,
@@ -2611,6 +2617,8 @@ static int reiserfs_write_begin(struct file *file,if (ret) {unlock_page (page);page_cache_release (page); +/* Truncate allocated blocks */ +reiserfs_truncate_failed_write (inode); }return ret; }
@@ -2703,8 +2711,7 @@ static int reiserfs_write_end(struct file *file, struct address_space *mapping,** transaction tracking stuff when the size changes. So, we have ** to do the i_size updates here. */ - pos += copied; -if (pos > inode->i_size) { +if (pos + copied > inode->i_size) {struct reiserfs_transaction_handle myth;reiserfs_write_lock (inode->i_sb);/* If the file have grown beyond the border where it
@@ -2722,7 +2729,7 @@ static int reiserfs_write_end(struct file *file, struct address_space *mapping, goto journal_error; }reiserfs_update_inode_transaction (inode); - inode->i_size = pos; + inode->i_size = pos + copied;/* * this will just nest into our transaction. It's important * to use mark_inode_dirty so the inode gets pushed around on the
@@ -2749,6 +2756,10 @@ static int reiserfs_write_end(struct file *file, struct address_space *mapping, out:unlock_page (page);page_cache_release (page); + +if (pos + len > inode->i_size) +reiserfs_truncate_failed_write (inode); +return ret ==0 ? copied : ret; journal_error:
ipc/msg.c +1 -0
@@ -125,6 +125,7 @@ void msg_init_ns(struct ipc_namespace *ns)void msg_exit_ns (struct ipc_namespace *ns) {free_ipcs (ns, &msg_ids (ns), freeque); +idr_destroy (&ns->ids[IPC_MSG_IDS ].ipcs_idr); }#endif
ipc/sem.c +1 -0
@@ -129,6 +129,7 @@ void sem_init_ns(struct ipc_namespace *ns)void sem_exit_ns (struct ipc_namespace *ns) {free_ipcs (ns, &sem_ids (ns), freeary); +idr_destroy (&ns->ids[IPC_SEM_IDS ].ipcs_idr); }#endif
ipc/shm.c +1 -0
@@ -100,6 +100,7 @@ static void do_shm_rmid(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp)void shm_exit_ns (struct ipc_namespace *ns) {free_ipcs (ns, &shm_ids (ns), do_shm_rmid); +idr_destroy (&ns->ids[IPC_SHM_IDS ].ipcs_idr); }#endif